-Fix: correct out-of-bounds access in map generator, preserving original maps