Middle mouse button stops working from time to time
USB Overdrive was the culprit, and I found that it happened when I held the scroll wheel clicked and scrolled at the same time. By disabling/enabling USB Overdrive, it started to work again.

However, when I disable the setting "Wheel button: Middle button", this stopped happening, and the middle mouse button works as it should.