Yeah, I've seen variants of this problem before. It would be awesome if you could file a bug with a reduced case that focuses just on this problem.
IMO it should not compile because no X: Equatable conformance is in scope; otherwise, what does it mean that imports are written in particular files?
I think it should work if you import just one of B or C, and as I noted earlier, I don't think it should be possible to use X at all in a context that imports both of them.