Fix accidental leaking of variables to the global scope.

Found using jscritic.com