Index: wp-includes/link-template.php
===================================================================
--- wp-includes/link-template.php	(revision 7591)
+++ wp-includes/link-template.php	(working copy)
@@ -554,7 +554,7 @@
 			}
 
 			if ( !empty($excluded_categories) ) {
-				$posts_in_ex_cats_sql = " AND tt.term_id NOT IN (" . implode($excluded_categories, ',') . ')';
+				$posts_in_ex_cats_sql = " AND tt.taxonomy = 'category' AND tt.term_id NOT IN (" . implode($excluded_categories, ',') . ')';
 			}
 		}
 	}
