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

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>
I'm sure this should occur before the connecton is released.  I'm not sure I saw any symptoms though