In this scope at id attribute in HTML tag:
entity.other.attribute-name.id.html meta-attribute-with-value.id.html meta.tag.block.any.html text.html.basic
scope selector (1): meta.tag entity
wins over scope selector (2): entity.other.attribute-name.id.html
I would argue that by this definition: manual.macromates.com/en/scope_selectors
scope selector (2) should win in step 2, first pass.
I can’t try this in TextMate, but this is how e does it.