https://github.com/mgabka approved this pull request. LGTM, not sure if any extra changes added to the tests because of this bug needs to be reverted or not, but the change added in this PR looks correct to me. https://github.com/llvm/llvm-project/pull/78989