HPCC-11288 - regression if inside transaction

Signed-off-by: Jake Smith <jake.smith@lexisnexis.com>
Merge pull request #5756 from jakesmith/hpcc-11288

HPCC-11288 - regression if inside transaction

Reviewed-By: Atilla Vamos <attila.vamos@lexisnexis.com>
Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>