Added checks to prevent adding enemy units to control groups

as discussed in #4949.