Index: query.php
===================================================================
--- query.php	(revision 35946)
+++ query.php	(working copy)
@@ -5023,7 +5023,9 @@
 		if ( ! $link ) {
 			return;
 		}
-
+		 if ( $link === get_post_permalink() ) { 
+				return; 
+		} 
 		wp_redirect( $link, 301 ); // Permanent redirect
 		exit;
 	endif;
