Remove duplication in route_command matcher.