Added sort for vertices to Mesh::getEntities.