Okay, that's a lot simpler to fix.  Maybe just swap the `RegExp.` call for `((js/eval "RegExp") "f(")`?  Presumably GClosure doesn't think it's smart enough to peek inside of evals.

If that doesn't work, then some analogous code that doesn't involve an optimizeable regex construction will do.  The point of the test is to make sure `thrown-with-msg?` works with a more specific error type than `js/Error` being thrown from code the test doesn't control.