Improve the errors emitted when modules clash channels/datatypes.

Previously it would just say that the module M (for example) was not in
scope, which is clearly unhelpful.