fix: ensure :has
selectors followed by other selectors match
#13824
+96
−88
:has
selectors followed by other selectors match
#13824