HPCC-10420 Ensure contents of expr attributes are hoisted when required

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

HPCC-10420 Ensure contents of expr attributes are hoisted when required

Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>