See https://github.com/rails/rails/pull/10675