fix bug 21723

*** WIP untested, I'm just making a PR so I don't forget to come back to this. ***

https://gna.org/bugs/index.php?21723

I think most likely the "parse_team_overlays" function in
display.cpp needs to change as well.