Just put up this PR (#23787). I'm not sure if this is the best way to go about fixing this though. My patch fixes the crashing coercion, but it could be that the type is being incorrectly deduced which is causing the coercion to happen in the first place. If that's the case, then I treated the symptom, not the problem. @AnthonyLatsis Do you think this is the right way to go about fixing this?