Second attempt at fixing infinite loop when mapgen can't find anywhere to put stairs.

Just make the loop safe.