Adding some missing local statements

Avoiding global scope pollution. I'll prepare a branch where this kind of errors are also detectable during the tests.