This is for issue #8684 on rails/rail.