Fixed #115: Backport GEOS-5482