GEOT-4776 backport to 11.x

GEOT-4776 backport to 11.x