Fix bug introduced in contrib.gis in 74f3884ae0

See discussion on #1069