Well, HTML5 recommends to set `@lang` on the HTML element to declare the **document**'s language, and I believe it's a rather widely used practice. I think it's safe to consider that any other deeper `@lang` do not represent the **document** language, but rather language islands.
I agree that it doesn't catch the case where people set the language on the body elem, but this s/b super rare and bad practice anyway.