Fixed in https://github.com/rails/rails/commit/a3c8e4add7178e86d80584f2c7df51b77fc882ff