Fixed pyinotify performance regression in 15f82c7011

Fixes again #9722.
ìsinstance` is not necessarily inappropriate here, I was only reluctant to import/hardcode StaticFilesHandler here. I even didn't test it in fact. Should I?