Index: wp-includes/theme.php
===================================================================
--- wp-includes/theme.php	(revision 10584)
+++ wp-includes/theme.php	(working copy)
@@ -854,15 +854,26 @@
 	if ( validate_file($_GET['template']) )
 		return;
 
-	add_filter('template', create_function('', "return '{$_GET['template']}';") );
+	add_filter( 'template', create_function('', "return '{$_GET['template']}';") );
 
+	$preview_theme_path = $_GET['template'];
+
 	if ( isset($_GET['stylesheet']) ) {
 		$_GET['stylesheet'] = preg_replace('|[^a-z0-9_.-/]|i', '', $_GET['stylesheet']);
 		if ( validate_file($_GET['stylesheet']) )
 			return;
-		add_filter('stylesheet', create_function('', "return '{$_GET['stylesheet']}';") );
+		add_filter( 'stylesheet', create_function('', "return '{$_GET['stylesheet']}';") );
+
+		$preview_theme_path = $_GET['stylesheet'];
 	}
 
+	// Prevent theme mods to current theme being used on theme being previewed
+	$preview_theme = get_theme_data( WP_CONTENT_DIR . "/themes/$preview_theme_path/style.css" );
+	$preview_theme_name = $preview_theme['Name'];
+	$current_theme = get_current_theme();
+	if ( $current_theme !== $preview_theme_name )
+		add_filter( "pre_option_mods_{$current_theme}", create_function('', "return get_option(\"mods_{$preview_theme_name}\");") );
+
 	ob_start( 'preview_theme_ob_filter' );
 }
 add_action('setup_theme', 'preview_theme');
