See https://github.com/rails/rails/pull/1776#issuecomment-1402894, 2df2bfdb4b, and 7440a254c4.
2df2bfdb4b
7440a254c4