Modify RouteCollection.resolve method to use regular for to loop through routes