HPCC-12666 Fix regressions in workunit refactoring (HPCC-12250)

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