HPCC-8624 - roll back forward, for master

This changed was deliberately rolled back for 4.2.2, but
accidentally rolled back at the same time on master.
This pull requests re applies HPCC-8624 changes

Signed-off-by: Jake Smith <jake.smith@lexisnexis.com>