factor this out
don't search for dead ends in the mines (fixes #37)