Fix SF bug [ 808594 ] leak on lambda with duplicate arguments error.

Refactor code so that one helper routine sets error location and
increments st_errors.

Bug fix candidate.
1 file changed