HPCC-11988 Fix hthor calling helper functions too early

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

HPCC-11988 Fix hthor calling helper functions too early

Reviewed-by: Jake
Merge remote-tracking branch 'origin/candidate-4.2.8' into closedown-5.0.x

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>