added a short-circuit

added a short-circuit to not slow down builds when there are no rules