I can't repro this in the debugger (can't guess what I need to configure to match my build), but here's what I'm seeing (names altered for brevity):
goog.module("a");
const f = v => {
if (v instanceof Array) v.forEach(e => f(e));
else console.log(v);
};
exports = {
f
}
... ERROR - variable f$$module$a is undeclared ...
Debugging the compiler, the variable in scope is actually named:
module$contents$a_f
I'm experimenting with commonjs modules, if it's related.
The workaround is to use