https://github.com/pratlucas approved this pull request. The changes look good to me. Good catch spotting the inconsistency in the dependency expansion after the extension set is flattened. https://github.com/llvm/llvm-project/pull/93695