Add test for #98294 Add a test to make that the failure condition for this pattern is optimized away. Fixes #98294.