Help with a 'simple' advanced query (searching for block with multiple tags)

It doesn’t?

Either way, the attribute :block/name is always in lower case.
Also :ref-pages is deprecated. Should use either :path-refs or :refs.
Where :path-refs takes ancestors into account:

  • Block with #MyTag
    • TODO block without a tag

:path-refs will return the block TODO block without a tag. :refs will not as it only looks at the references present directly in the block itself.