HPCC-10533 Fix EnvGen segmentation fault

  - Regression

Signed-off-by: Gleb Aronsky <gleb.aronsky@lexisnexis.com>
Merge pull request #5249 from garonsky/HPCC-10533_EnvGen_Regression2

HPCC-10533 Fix EnvGen segmentation fault

Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>