Fix fails_with_llvm compatibility

Fixes #18565.