This is supposed to work in our tests and documentation:

    anotherWindow.activate();
    // set
    windows.activeWindow == anotherWindow;

we've had a number of focus issues on linux especially, given the implementation I'd say we are lucky that the above test doesn't fail intermittently, but having said that there is no reason why the code above can't work if the implementation cached the active window.

Anyhow, we should safe guard against intermittent fails when that is not what we are testing.