I'm using HTML5 WebWorkers, and i faced such problem (while compiling my scripts with closure compiler):
I have two files (.js) with this code inside:
...
var encoder = null;
...
In other words i have two global variables with the same name.
These files will be used as a source for both workers that i want to launch, and as i know, both files will be executed in their own scope, and there would be no conflicts during runtime.
One more condition is that i want to compile both files (modules) in one time
--module module1:1
--js file
--module module2:1
--js file2.js
But, Closure Compiler detects that conflict and says, that module2 should depend on module1, because both have same global variables.
What should i do?