I just spent the last five minutes tracking down a bug which resulted in a fresh corpse occasionally (about one time in three) wandering into another room after being killed.
Algorithmically generated content can be really tricky to get right, even when it’s as simple as this! :)