HPCC-9861 Fix ECL regeneration of functions with multiple calls.

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

HPCC-9861 Fix ECL regeneration of functions with multiple calls.

Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>