this is only used in enhancer_controller_for_templates_by_class service, moved it down to where we actually add that service to the dynamic router.