TODO: I think this is needed because there was no followup to rails/rails#46270. See rails/rails@901828f2 from that PR for background.