HPCC-11430 Prevent stack fault when parameter not substituted

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

HPCC-11430 Prevent stack fault when parameter not substituted

Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>