Ok, I figured it out, and it has been a problem all the way since we introduced more than one NPC team.
The team number assigned to the NPC's have not been the constant the rest of the code expects them to be, so for each extra player added to any team, the team index number of all the NPC's got offset by one.
E.g. if two players were on the same team, the beast NPC would get team index 39 and predator 40 while the code expects it to be 40 and 41.
If three players is added to the same team, then the beast team gets 38, predator 39, and prey 40.
If two teams have two players, then that's the same as if one team had three players.
This all happens when the NPC teams are initialized where it loops through the player indexes above 39 and initialize each of the NPC's, the thing is that for each player index it does this to get its team index:
"TeamTypes eTeam = GET_TEAM(GET_PLAYER(ePlayer).getTeam()).getID();"
The game makes some assumptions about team offsets based on how many players have abandoned their natural team number, so the newly initilized NPC will have taken a team number that is lower than its player index by default.