diff -u /tmp/flag/flag.inc ./flag.inc
--- /tmp/flag/flag.inc	2011-01-11 14:44:47.000000000 +0100
+++ ./flag.inc	2011-06-23 10:31:29.000000000 +0200
@@ -1278,7 +1278,7 @@
     // Ensure that only flaggable node types are granted access. This avoids a
     // node_load() on every type, usually done by applies_to_content_id().
     $result = db_select('node', 'n')->fields('n', array('nid'))
-      ->condition('nid', $content_ids, 'IN')
+      ->condition('nid', array_keys($content_ids), 'IN')
       ->condition('type', $this->types, 'NOT IN')
       ->execute();
     foreach ($result as $row) {
diff -u /tmp/flag/flag.module ./flag.module
--- /tmp/flag/flag.module	2011-01-11 14:44:47.000000000 +0100
+++ ./flag.module	2011-06-23 10:59:48.000000000 +0200
@@ -949,7 +949,7 @@
     // want to deny access, or use the current access value provided by Flag.
     $result = db_select('node', 'n')
       ->fields('n', array('nid', 'uid'))
-      ->condition('nid', $content_ids, 'IN')
+      ->condition('nid', array_keys($content_ids), 'IN')
       ->condition('type', $flag->types, 'IN')
       ->execute();
     foreach ($result as $row) {
