But at least for jscript code (not the engine) it seems it's always the outer window.
Yes, the distinction should likely be hidden from js code, but there are other ways to do that, so tests written in js may not be conclusive. There is, for example, `IObjectIdentity` interface, see `disp_cmp` in jscript.