When building a module consisting of submodules, the preprocessor maintains a global set of included headers. This information gets serialized into the PCM file (specifically into the HeaderFileInfo table). After loading such PCM file, this information is deserialized into the state of the importing preprocessor. This happens even if the headers were included by (sub)modules that are not visible. This can incorrectly prevent imports of textual headers in the importing instance (see attached tests).
This patch fixes this bug splitting the set of included files per submodule. This is an alternative to D112915 and D104344.