I guess we will indeed need to keep refs from inner windows to outer windows after all, but I'll leave that aside for a follow-up MR, so for now they're todo_wine.
There are other ways to support that, without keeping refs from inner windows. I find it hard to justify spending time on it if it's just for sake of this test, so let's leave it aside, please.