Fixed a bug where the number of tiles stored internally differed from
the number of tiles in the maps.