Updating GS code to deal with GEOT-4640