Addressing comments by Jean Michel for PR 867.

Forgot to include local variables in var statement.