diff --git wp-includes/query.php wp-includes/query.php
index 443d0bb..5e97a22 100644
--- wp-includes/query.php
+++ wp-includes/query.php
@@ -2219,21 +2219,21 @@ class WP_Query {
 		}
 
 		if ( $this->is_tax ) {
-			if ( empty($post_type) ) {
-				// Do a fully inclusive search for currently registered post types of queried taxonomies
-				$post_type = array();
-				$taxonomies = wp_list_pluck( $this->tax_query->queries, 'taxonomy' );
-				foreach ( get_post_types( array( 'exclude_from_search' => false ) ) as $pt ) {
-					$object_taxonomies = $pt === 'attachment' ? get_taxonomies_for_attachments() : get_object_taxonomies( $pt );
-					if ( array_intersect( $taxonomies, $object_taxonomies ) )
+			$post_types = empty( $post_type ) ? array( 'post' ) : (array) $post_type;
+
+			$post_type = array();
+			$taxonomies = wp_list_pluck( $this->tax_query->queries, 'taxonomy' );
+			foreach ( $taxonomies as $t ) {
+				foreach ( $post_types as $i => $pt ) {
+					if ( is_object_in_taxonomy( $pt, $t ) && ! in_array( $pt, $post_type ) )
 						$post_type[] = $pt;
 				}
-				if ( ! $post_type )
-					$post_type = 'any';
+			}
 
+			if ( ! empty( $post_type ) ) {
 				$post_status_join = true;
-			} elseif ( in_array('attachment', (array) $post_type) ) {
-				$post_status_join = true;
+			} else {
+				$where = ' 0 = 1 AND' . $where;
 			}
 		}
 
