GEOT-4464 Backport to 9.x