Fix 'mapgen griefing' by checking node before cave placement