#2158 backport fix from 2.1 to 2.0 to see if it prevents crashing of cunit on shp2pgsql-gui tests on winnie

git-svn-id: http://svn.osgeo.org/postgis/branches/2.0@11386 b70326c6-7e19-0410-871a-916f4a2858ee