Index: wp-includes/taxonomy.php
===================================================================
--- wp-includes/taxonomy.php	(revision 18443)
+++ wp-includes/taxonomy.php	(working copy)
@@ -1385,9 +1385,11 @@
 
 	// Make sure we show empty categories that have children.
 	if ( $hierarchical && $hide_empty && is_array($terms) ) {
+		$tax_terms = !empty($include) || !empty($exclude) || !empty($exclude_tree) ? get_terms($taxonomies) : $terms;
+
 		foreach ( $terms as $k => $term ) {
 			if ( ! $term->count ) {
-				$children = _get_term_children($term->term_id, $terms, $taxonomies[0]);
+				$children = _get_term_children($term->term_id, $tax_terms, $taxonomies[0]);
 				if ( is_array($children) )
 					foreach ( $children as $child )
 						if ( $child->count )
