See https://github.com/rails/rails/issues/11362#issuecomment-20597066.