Adds test for global scope handling.