Merge "Fix bug in IME handling of pending key events."