Unassign all group on unit switching, #2535

#2535