HPCC-11988 Fix hthor calling helper functions too early

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