Remove unused map.itypes; use g->itypes where needed.

It was used in only two places, and apparently managed to get itself initialized empty -- thus leading to crash. As a result, this PR also closes #1923.