The inner window is an implementation detail and should never be accessed directly by non-mshtml code.
This is not true. We currently pass inner window as a script global object and the attached [test](/uploads/2621613fc9e1ca17295d37b0b9cbb6b3/patch.diff) shows that we shouldn't use outer windows there. I don't remember details, but I recall seeing similar things in dom.c tests. It's likely that we don't handle it exactly like native does, so there may room for improvements, but generally it makes sense for the global script object to not follow navigation.