I think you missed my point. Unless you can post a script that will compile and execute on my machine as is and replicates your issue, I cannot help you debug. Possible errors might be related to extensive use of closures/globals, that your original script does not actually
(globals again) or that you've implemented prototyping incorrectly - personally, I suspect the first possibility. But without code, I can't really say any more. Perhaps this link would be helpful:
.