I think the bug is occuring because the "double-click" feature automatically selects all units. The commander(s) are highlighted based on the stats of the original selected unit. When the unit that doesn't fit is selected, the game then notices that it doesn't belong.