Add test for issue #42
Merge branch 'master' into scope-rewrite