Fix various bugs and leftovers from previous map data reworking.