Index: wp-includes/taxonomy.php
===================================================================
--- wp-includes/taxonomy.php	(revision 15621)
+++ wp-includes/taxonomy.php	(working copy)
@@ -457,7 +457,7 @@
 	$taxonomies = (array) $taxonomies;
 
 	foreach ( $taxonomies as $taxonomy ) {
-		if ( ! taxonomy_exists( $taxonomy ) )
+		if ( !taxonomy_exists( $taxonomy ) )
 			return new WP_Error( 'invalid_taxonomy', sprintf( __( 'Invalid Taxonomy: %s' ), $taxonomy ) );
 	}
 
@@ -530,24 +530,32 @@
  *   'field' string Which term field is being used. Can be 'term_id', 'slug' or 'name'
  *   'operator' string Can be 'IN' and 'NOT IN'
  *
- * @return array|WP_Error List of matching object_ids; WP_Error on failure.
+ * @return array|bool List of matching object_ids; False on failure.
  */
 function wp_tax_query( $queries ) {
 	global $wpdb;
 
-	$sql = array();
+	$sql_list = array();
 	foreach ( $queries as $query ) {
 		if ( !isset( $query['include_children'] ) )
 			$query['include_children'] = true;
 		$query['do_query'] = false;
-		$sql[] = get_objects_in_term( $query['terms'], $query['taxonomy'], $query );
+		$sql = get_objects_in_term( $query['terms'], $query['taxonomy'], $query );
+
+		if ( is_wp_error( $sql ) )
+			continue;
+
+		$sql_list[] = $sql;
 	}
 
-	if ( 1 == count( $sql ) )
-		return $wpdb->get_col( $sql[0] );
+	if ( empty( $sql_list ) )
+		return false;
 
+	if ( 1 == count( $sql_list ) )
+		return $wpdb->get_col( $sql_list[0] );
+
 	$r = "SELECT object_id FROM $wpdb->term_relationships WHERE 1=1";
-	foreach ( $sql as $query )
+	foreach ( $sql_list as $query )
 		$r .= " AND object_id IN ($query)";
 
 	return $wpdb->get_col( $r );
Index: wp-includes/query.php
===================================================================
--- wp-includes/query.php	(revision 15624)
+++ wp-includes/query.php	(working copy)
@@ -1940,7 +1940,14 @@
 		if ( !empty( $tax_query ) ) {
 			$this->tax_query = $tax_query;
 
-			$where .= " AND $wpdb->posts.ID IN( " . implode( ', ', wp_tax_query( $tax_query ) ) . ")";
+			$tax_found_ids = wp_tax_query( $this->tax_query );
+
+			if ( is_array( $tax_found_ids ) ) {
+				if ( !empty( $tax_found_ids ) )
+					$where .= " AND $wpdb->posts.ID IN(" . implode( ',', $tax_found_ids ) . ")";
+				else
+					$where .= " AND 0 = 1";
+			}
 		}
 
 		if ( !empty($q['meta_key']) ) {
