Just had to come back after a few days and say that once I got this working and added the other script that highlights the reply in the thread, it made reading notifications so much easier.
Are you possibly on Firefox? The userscript now requires the :has() selector which is disabled behind a flag on Firefox. you can enable it by opening about:config in a new tab, searching for layout.css.has-selector.enabled and setting it to true
That did it. Weird that the first refresh had both the old indicator and the bell showing, but now it's back to normal again. I guess there's no way to indicate to FF users what needs to be toggled, is there?
Definitely if you can detect it, have it break gracefully and let the user know. Wasn't sure if that was possible or not. I can't fault FF for locking some things down a bit.