Parameter name expansion fix for template functions.

Fix regression in 4.0.0 where a template function containing a parameter
with the same name as the function name led to the parameter name used in the
target language being incorrectly modified.

Closes #1602
3 files changed