Index: wp-includes/query.php
===================================================================
--- wp-includes/query.php	(revision 11808)
+++ wp-includes/query.php	(working copy)
@@ -2072,11 +2072,11 @@
 
 		if ( 'any' == $post_type ) {
 			$where .= " AND $wpdb->posts.post_type != 'revision'";
-		} elseif ( $this->is_attachment ) {
+		} elseif ( empty($post_type) && $this->is_attachment ) {
 			$where .= " AND $wpdb->posts.post_type = 'attachment'";
-		} elseif ($this->is_page) {
+		} elseif ( empty($post_type) && $this->is_page ) {
 			$where .= " AND $wpdb->posts.post_type = 'page'";
-		} elseif ($this->is_single) {
+		} elseif ( empty($post_type) && $this->is_single ) {
 			$where .= " AND $wpdb->posts.post_type = 'post'";
 		} else {
 			$where .= " AND $wpdb->posts.post_type = '$post_type'";
