Index: wp-includes/link-template.php
===================================================================
--- wp-includes/link-template.php	(revision 18084)
+++ wp-includes/link-template.php	(working copy)
@@ -1103,6 +1103,13 @@
 	if ( empty( $post ) )
 		return null;
 
+	$post_category_count = count( wp_get_post_categories( $post->ID ) );
+	if ( $in_same_cat && ! $post_category_count )
+		return null;
+	
+	if ( !$post_category_count )
+		$in_same_cat = false;
+
 	$current_post_date = $post->post_date;
 
 	$join = '';
