There is no need for IGNORE_xxxxx. You can simply use a "identification skill". Every group get its own ID. If the scanned ID is different, the enemy was scanned. If its the same (my.ID == you.ID) the own team members are detectet.