Fix flag inversion when alias/mask members exist.