HPCC-8655 Fix ESP crash when running WUGetDependancyTrees

ESP crashes because the code uses a wu pointer which has been cleared.

Signed-off-by: Kevin Wang <kevin.wang@lexisnexis.com>
Merge branch 'h8655' into candidate-3.10.2

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>