I think that you can turn on “make primary group” for group B, which will make it so that flair B has priority.
Automatically set as primary group