Index: wp-includes/functions.php
===================================================================
--- wp-includes/functions.php	(revision 2395)
+++ wp-includes/functions.php	(working copy)
@@ -1009,13 +1009,13 @@
     $post_id_list = implode(',', $post_id_list);
 
     $dogs = $wpdb->get_results("SELECT DISTINCT
-        ID, category_id, cat_name, category_nicename, category_description, category_parent
-        FROM $wpdb->categories, $wpdb->post2cat, $wpdb->posts
-        WHERE category_id = cat_ID AND post_id = ID AND post_id IN ($post_id_list)");
+        post_id, category_id, cat_name, category_nicename, category_description, category_parent
+        FROM $wpdb->categories, $wpdb->post2cat
+        WHERE category_id = cat_ID AND post_id IN ($post_id_list)");
         
     if (!empty($dogs)) {
         foreach ($dogs as $catt) {
-					$category_cache[$catt->ID][$catt->category_id] = $catt;
+		$category_cache[$catt->post_id][$catt->category_id] = $catt;
         }
     }
 

