A filename can be remapped with a header map to point to a framework
header and we can find the corresponding framework without the header.
But if the original filename doesn't have a remapped framework name,
we'll fail to find its location and will dereference a null pointer
during diagnostics emission.
Fix by tracking remappings better and emit the note only if a framework
is found before any of the remappings.
rdar://problem/48883447
NIT: It looks like HasBeenMapped should be always set when CacheLookup.MappedName is set as well. Would it make sense to check CacheLookup.MappedName instead to avoid divergence in the future? You could have a helper lambda HasBeenMapped = [] (&) { return CacheLookup.MappedName; } as well.