HPCC-8781 Improved ONCE handling for roxie/hthor

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>
Merge pull request #3952 from ghalliday/issue8781

HPCC-8781 Improved ONCE handling for roxie/hthor

Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>