Prevent corpses being spawned inside hospital walls.

Fixes #2505 and #2529.