Minor optimization in the Router class.