I remember a couple of past pitches that dealt with this same topic:
This is not solving quite the same problem, but it's related:
I think that augmenting canImport with this capability makes some sense. Specifying the module that the declaration is expected in sidesteps one of the main problems with other approaches, which was that allowing the queries to match declarations in the module being compiled would create a cycle between parsing and type checking in the compiler. Since canImport only operates on dependencies, by definition that cycle isn't an issue.