In D134923, the scanner introduced canonicalization of framework directories when reporting module map paths in order to increase module sharing. However, if we canonicalize framework directory that plays a role in a VFS remapping, and later try to use that module map to build the module, header lookup can fail. This happens when the module headers are remapped using the original framework path.
This patch fixes that. The implementation relies on the fact that the chain of directories in VFS remapping are assigned DirectoryEntry objects distinct from their on-disk counterparts. If we detect that case, we avoid the canonicalization.
Wouldn't this indicate the particular VFS has a bug?