The issue with dungeons arises for a different reason – during random map generation, the game doesn't check the selected heroes and places anyone in the dungeons. For example, if you take such a generated map and try to play on it, it won't let you choose the heroes that are already in the dungeons.
Auto-translated