--- flag.actions.inc	Tue Jun 24 22:47:11 2008
+++ flag.actions.inc	Fri Jun 27 19:59:54 2008
@@ -131,11 +131,13 @@
   }
 
   // Check if this action applies to this flag.
-  if (in_array($context['flag'], $context['flags'])) {
-    // Check if the flag is over the threshold.
-    $counts = flag_get_counts($context['content_type'], $context['content_id']);
-    if ($counts[$context['flag']] == $context['threshold']) {
-      return TRUE;
+  foreach ($context['flags'] as $flag) {
+    if ($flag && ($context['flag'] == $flag)) {
+      // Check if the flag is over the threshold.
+      $counts = flag_get_counts($context['content_type'], $context['content_id']);
+      if ($counts[$context['flag']] == $context['threshold']) {
+        return TRUE;
+      }
     }
   }
   return FALSE;
