Whether that code is fine or not, I don't know for sure, it was my primary suspect, I do know the setting is ignored because I gets loads of new user notifications while the setting for me is off
update:
okay, did a codetest, you are right. But somehow somewhere else on the road it goes wrong, because the bug itselve is definitely there.