I see no problem with it. Would you mind stating the rule you refer to? We may escape it because the negation is in the relative clause, rather than the main clause.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.
Not sure of what rule(s) you are referring to, but the sentence is correct.
In your example, "somebody" can mean a couple of things, but it isn't necessarily negative. One way is that the speaker actually knows who "doesn't want visitors" and is being coy in the expression "somebody". The other is that the speaker genuinely doesn't know who the person is and is using "somebody" as