https://github.com/alexfh approved this pull request. I verified that this fixes the problems we've found so far, but I can't say anything about the correctness or other aspects of this approach. https://github.com/llvm/llvm-project/pull/132536