Index: commerce_tax.module
===================================================================
--- commerce_tax.module (revision 471)
+++ commerce_tax.module (working copy)
@@ -225,19 +225,32 @@
  *   The line item to which the taxes should be applied.
  */
 function commerce_tax_type_calculate_rates($tax_type, $line_item) {
-  // Load all the rule components.
-  $components = rules_get_components(FALSE, 'action');
+  $tax_rates = commerce_tax_rates();
 
-  // Loop over each tax rate in search of matching components.
+  // Try to determine if there is any tax rate that will trigger rules.
+  $needs_rules = array();
   foreach (commerce_tax_rates() as $name => $tax_rate) {
     // If the current rate matches the type and specifies a default component...
     if ($tax_rate['type'] == $tax_type['name'] && !empty($tax_rate['rules_component'])) {
-      $component_name = $tax_rate['rules_component'];
+      $needs_rules[$name] = $tax_rate;
+    }
+  }
 
-      // If we can load the current rate's component...
-      if (!empty($components[$component_name])) {
-        // Invoke it with the line item.
-        rules_invoke_component($component_name, $line_item);
+  if (!empty($needs_rules)) {
+    // Load all the rule components.
+    $components = rules_get_components(FALSE, 'action');
+
+    // Loop over each tax rate in search of matching components.
+    foreach ($needs_rules as $name => $tax_rate) {
+      // If the current rate matches the type and specifies a default component...
+      if ($tax_rate['type'] == $tax_type['name'] && !empty($tax_rate['rules_component'])) {
+        $component_name = $tax_rate['rules_component'];
+  
+        // If we can load the current rate's component...
+        if (!empty($components[$component_name])) {
+          // Invoke it with the line item.
+          rules_invoke_component($component_name, $line_item);
+        }
       }
     }
   }
