HPCC-11988 Fix hthor calling helper functions too early

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>
not new and point of style only, but I think I'd prefer this as else of if below.