https://github.com/lhames approved this pull request. LGTM. Nice catch. Thanks @nikic! With some work we could write a unit test to test this, but I don't have the bandwidth at the moment and I don't think it's worth holding up this fix for. https://github.com/llvm/llvm-project/pull/95253