Support has_child/has_parent inside a :not filter.