Fix checks in Map::resize().