When a symbol comes from the non self-contained header, we recursively uplift
the file we consider used to the first includer that has a header guard. We
need to do this while we still have FileIDs because every time a non
self-contained header is included, it gets a new FileID but is later
deduplicated by HeaderID and it's not possible to understand where it was
included from.
Based on D114370.
there's some subtle logic buried in here here:
I'd prefer to see these expressed these more explicitly, and it's worth thinking if they're the right decisions or just provide the tersest loop :-)
Really I think pulling out a function: headerResponsible(FileID, ...) might make it possible to make this code clearer without cluttering the outer algorithm