Fix shared context becoming available too late

It's now available for the rest of the window constructor.