Index: post.php
===================================================================
--- post.php	(revision 15603)
+++ post.php	(working copy)
@@ -4089,15 +4089,23 @@
 
 	update_post_cache($posts);
 
-	$post_ids = array();
-	foreach ( $posts as $post )
+	$post_ids = $post_types = array();
+	foreach ( $posts as $post ) {
 		$post_ids[] = $post->ID;
+		$post_types[] = $post->post_type;
+	}
 
 	if ( empty($post_type) )
-		$post_type = 'post';
+		$post_type = array_unique( $post_types );
+	else if ( 'any' == $post_type )
+		$post_type = array_unique( $post_types );
+	else if ( !is_array( $post_type ) )
+		$post_type = array( $post_type );
 
-	if ( !is_array($post_type) && 'any' != $post_type && $update_term_cache )
-		update_object_term_cache($post_ids, $post_type);
+	if ( $update_term_cache ) {
+		foreach ( $post_type as $type )
+			update_object_term_cache($post_ids, $type);
+	}
 
 	if ( $update_meta_cache )
 		update_postmeta_cache($post_ids);
