This https://github.com/rails/rails/commit/5da4d514 was added later which may have led to the duplication.