538a539
>   $searched_tids = array();
552,553c553,580
<     $categories = faceted_search_ui_build_categories($search, $index, 0, $max_count);
<     if (count($categories) > 0 || $facet->is_active()) {
---
> 
>     
> 
>     if ($facet->is_active()) {
> 		//unset any duplicate tax divs
> 		$facet_css = "faceted-search-facet--taxonomy--" . $facet->_vocabulary->vid;	
> 		foreach ($facet_content as $key => $value) {
> 			if (stristr($value, $facet_css)) {
> 				unset($facet_content[$key]);
> 			}
> 		}
> 		
> 		//keep track of tids in search, adding each to an array
> 		$search_path = $facet->_path;
> 		$searched_tids[] = $search_path[0]->_tid;
> 		$categories = faceted_search_ui_build_categories($search, $index, 0, $max_count, TRUE, $searched_tids);
> 		if (count($categories) > 0) {
> 			$content = theme('faceted_search_ui_facet_heading', $search->get_env_id(), $search->ui_state, $search->get_filters(), $index, 'guided');
> 			$content .= theme('faceted_search_ui_categories', $facet, $categories, $search->ui_state['stage']);
> 			$facet_content[] = theme('faceted_search_ui_facet_wrapper', $search->get_env_id(), $facet, 'guided', $content);
> 		}
> 	}
> 
> 	
> 	$categories = faceted_search_ui_build_categories($search, $index, 0, $max_count, $searched_tids);
> 
>     // if (count($categories) > 0 || $facet->is_active()) {
>     if (count($categories) > 0 && !$facet->is_active()) {
902a930,932
> 
>   //funky period being put in current search tax instead of comma, this replaces it
>   $text = str_replace(".", ",", $text);
1019c1049
< function faceted_search_ui_build_categories($search, $index, $from = NULL, $max_count = NULL, $links = TRUE) {
---
> function faceted_search_ui_build_categories($search, $index, $from = NULL, $max_count = NULL, $links = TRUE, $searched_tids = array ()) {
1037a1068
> 
1052c1083,1087
<     $items[] = theme('faceted_search_ui_category', $category, $path);
---
> 
> 	//if this category is within the search, don't add to list
> 	if (isset($category->_tid) && !in_array($category->_tid, $searched_tids)){		
> 	    $items[] = theme('faceted_search_ui_category', $category, $path);
> 	}
1054a1090
> 
1182c1218
<       if ($facet->is_active()) {
---
>       if ($context != 'guided' && $facet->is_active()) {
1189c1225
<   if ($facet->is_active()) {
---
>   if ($context != 'guided' && $facet->is_active()) {
