ErrorReporter is set, and global scope is added to functions