SI-7655 Enforce stable id patterns conform to scrutinee type

This was only being done if the stable id pattern was a direct
reference to a module.

This commit distinguishes stable ID patterns with the recently
added facility in TreeInfo. (Actually, this might be overkill
in adapt and we could probably get away with just checking for
`_: Ident | _: Select`.)