Fix `rake routes` error when `Rails::Engine` with empty routes is mounted; fixes rails/rails#13810

Squash
Merge pull request #13811 from mdesantis/issue-13810

Fixes #13810 `rake routes` error when mount `Rails::Engine` with empty routes