I didn't played the game yet, just checked the source. Sorry if I'm wrong, but your "bugfix" has another bug.
In v1051 all zeds were following first player in the team (player, who joined last).
In v1052 all zeds are following first
visible player in the team. If no players are visible, then, like in v1051, zeds will follow first player in the team.
I bet if you have a zed following you and you hide behind the corner, after some time zed will turn back and follow the last joiner. Even if he is 100m away
Once again, this is just a theory. Need to play to test it.