Add test for builtin scope bug (issue #44)