Small fixes, phonebook crash, mapgen issues

Fixes #7854, phonebook segfault.
Fixes issue in hospital where counter spawns in same place as centrifuge and hides it.
Fixes metal grate spawning in public works where it looks like a gate should be.