See #2 and #1 for background information.
For some locations which are generated at runtime (ex. prison), stairs, doors, and other special tiles have a chance to spawn inside of the walls. The fix for this seems to be to tweak the generation of these locations so that this collision a) cannot happen, b) retries when it does happen. Although b) would break the game if there's no valid tile.