Fix possible segfault if tileHeader.numTiles == 0;