GEOT-4462 Backport to 9.x