[GEOT-4964] further parsing/encoding fixes