Index: query.php
===================================================================
--- query.php	(revision 17517)
+++ query.php	(working copy)
@@ -2211,7 +2211,7 @@
 			}
 		}
 
-		if ( !empty( $this->tax_query->queries ) || !empty( $q['meta_key'] ) ) {
+		if ( ( !empty( $this->tax_query->queries ) && !empty( $join ) ) || !empty( $q['meta_key'] ) ) {
 			$groupby = "{$wpdb->posts}.ID";
 		}
 
