Correction to step exit code logic

This corrects a bug introduced in
commit dbbd78e236363a4784c4f05a5f4145b5602789dd
which went off the end of an array
Correction to job step exit code logic

Corrections to commit dbbd78e236363a4784c4f05a5f4145b5602789dd
Index into array was using global task count rather than local
task count