Reverts llvm/llvm-project#143802. Follow-up fix 3c7af175e5 wasn't robust enough and itself got reverted.
3c7af175e5