Merge "Make IMM more robust to spurious window focus-in" into nyc-dev