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