Fixed a mapserver crash when using instanced maps with custom names

- Fixes bugreport:7658 (thanks to purityz)
  http://hercules.ws/board/tracker/issue-7658-instance-mapserver-crashing/
- The crash was caused by a pointer becoming invalid when reallocating
  map[] (i.e. when adding maps), since 20bdc01f

Signed-off-by: Haru <haru@dotalux.com>