Index: wp-includes/plugin.php
===================================================================
--- wp-includes/plugin.php	(revision 17631)
+++ wp-includes/plugin.php	(working copy)
@@ -135,19 +135,23 @@
 	global $wp_filter, $merged_filters, $wp_current_filter;
 
 	$args = array();
-	$wp_current_filter[] = $tag;
 
 	// Do 'all' actions first
 	if ( isset($wp_filter['all']) ) {
+		$wp_current_filter[] = $tag;
 		$args = func_get_args();
 		_wp_call_all_hook($args);
 	}
 
 	if ( !isset($wp_filter[$tag]) ) {
-		array_pop($wp_current_filter);
+		if ( isset($wp_filter['all']) )
+			array_pop($wp_current_filter);
 		return $value;
 	}
 
+	if ( !isset($wp_filter['all']) )
+		$wp_current_filter[] = $tag;
+
 	// Sort
 	if ( !isset( $merged_filters[ $tag ] ) ) {
 		ksort($wp_filter[$tag]);
