Fixed pyinotify performance regression in 15f82c7011

Fixes again #9722.
Exactly, I looked for one and didn't dare to add one just for that use case. I could reconsider.