Fixed bug with Terrain::getPatchForGrid()