Index: wp-includes/query.php
===================================================================
--- wp-includes/query.php	(revision 16132)
+++ wp-includes/query.php	(working copy)
@@ -1898,7 +1898,8 @@
 				$post_status_join = true;
 			}
 
-			$where .= $this->get_tax_sql( $q['tax_query'], "$wpdb->posts.ID" );
+			$tax_sql = $this->get_tax_sql( $q['tax_query'], "$wpdb->posts.ID" );
+			$where .= apply_filters_ref_array('posts_tax_sql', array( $tax_sql, &$this ) );
 
 			// Back-compat
 			$cat_query = wp_list_filter( $q['tax_query'], array( 'taxonomy' => 'category' ) );
