Possible fix for #776

Since I started getting the segfault after 38b2f89, this most likely has
to do with the value of the `last_enemy` variable in HazardManager.