make GetSpawnOccupants more robust against invalid list queries

fixes #5588
Merge pull request #5890 from Mailaender/negative-spawns-crash-fix

Made GetSpawnOccupants more robust against invalid list queries