Reverting changes from #7661 on master

https://github.com/rails/rails/pull/7661
https://github.com/rails/rails/issues/8854

This was reverted on 3.2.13 but left on master.

/cc @tenderlove