Nesting .has() selectors

Nesting .has() selectors

I'm trying to find an element that contains a certain hierarchy of elements. I thought this could be accomplished by nesting the .has() selector.

For example, assume the following hierarchy:

<r>
      <a>
            <b1/>
            <b2/>
            <b3>
                  <c/>
            </b3>
      </a>
</r>

for some reason:
  • $('a:has(b1 + b2 + b3:has(c))') returns a
  • $('r:has(a:has(b1 + b2 + b3))') returns r 
as expected, however: 
  • $('r:has(a:has(b1 + b2 + b3:has(c))') returns empty!
What am I missing here? Isn't it possible to nest more than 2 .has() selectors within a selector?