HPCC-9479 Include fields used from RIGHT in an ONFAIL

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>
Merge pull request #4679 from ghalliday/issue9479

HPCC-9479 Include fields used from RIGHT in an ONFAIL

Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>
Merge remote-tracking branch 'origin/candidate-4.0.2' into closedown-4.0.x

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