2.5.x

[#32007] Adapting George PR 3239 against staging to work against 2.5.x branch