Fix bug introduced in contrib.gis in 74f3884ae0