                      list_routes.append((httpmethods, methodname))
  
          ret = []
          for route in self.routes:
              if route.key == 'dynamic':
                  # Dynamic detail routes (@link or @action decorator)
                  for httpmethods, methodname in detail_routes:
                      initkwargs = route.initkwargs.copy()
                      initkwargs.update(getattr(viewset, methodname).kwargs)
                      ret.append(Route(
 
</s> remove             elif route.key == 'collection':
 </s> add             elif isinstance(route, DynamicListRoute): </s> remove                         key=route.key,
 </s> add  </s> remove         known_actions = flatten([route.mapping.values() for route in self.routes])
 </s> add         known_actions = flatten([route.mapping.values() for route in self.routes if isinstance(route, Route)]) </s> remove                         key=route.key,
 </s> add  </s> remove         Route(
            key='dynamic',
 </s> add         DynamicDetailRoute(
            if isinstance(route, DynamicDetailRoute):
                      list_routes.append((httpmethods, methodname))
  
          ret = []
          for route in self.routes:
            if isinstance(route, DynamicDetailRoute):
                  # Dynamic detail routes (@link or @action decorator)
                  for httpmethods, methodname in detail_routes:
                      initkwargs = route.initkwargs.copy()
                      initkwargs.update(getattr(viewset, methodname).kwargs)
                      ret.append(Route(
keep keep keep keep replace keep keep keep keep keep
 Introduce DynamicDetailRoute and DynamicListRoute to distinguish between different route types 
rest_framework/routers.py