Simplify the AND-rooted mask+shift checking code to match that of the