(browser.repl/connect) calls (bootstrap), which monkey-patches goog.require to write scripts to js/document.body (line 149).
If you call this from , before exists, you will get an error.
Google Closure handles this situation by writing to head in goog.appendScriptSrcNode_, so perhaps that will work.