No errors, the bots indexes don't exceed their client id (or go above MAXPLAYERS etc). The high values are the entities being created which aren't stored based on a range.
I have IsClientInGame and IsPlayerAlive checks in various versions of a few of the above functions, the ones I pasted much have been newer tests without them. I've honestly spent all day trying to get this to work fully and consistently, but it's not looking like it's going to happen. No matter what there is an issue with the trail being there every round.
If anyone else has any ideas, would love to hear them.