Currently, the algorithm for gathering affecting module maps includes those defining transitive dependencies. This seems like an over-approximation, since those don't change the semantics of current module build.
(With this patch, ModulesToProcess only ever holds modules whose headers will be serialized into the current PCM.)