When Clang loads a PCM that depends on another PCM describing framework module "FW", ModuleMap registers "FW" as known, without seeing the module map that defines it (or the adjacent "FW_Private" module map). Later, when looking at a header from "FW_Private", ModuleMap returns early due to having knowledge about "FW" and never associates that header with "FW_Private", leading to it being treated as textual. This behavior is caused by D150292, where the scanner stops calling HeaderSearch::lookupModule() eagerly for every loaded PCM.
This patch skips an early check when trying to figure out the framework module for a header, which ensures the "FW" and (most importantly) "FW_Private" module maps can be parsed even after loading "FW" from a PCM. Note that the HeaderSearch::loadModuleMapFile() function we not call unconditionally has caching behavior of its own, meaning it will avoid parsing module map file repeatedly.
Depends on D150320.
We should probably break for LMM_AlreadyLoaded instead of returning null.