unmap(): Prevent use-after-free if the map only consists of one item