add tests for "locals" leaking