The bug was that the release events for these also had the modifier state set, so the event comparison failed. Fixes #5901