Index: wp-includes/theme.php
--- wp-includes/theme.php
+++ wp-includes/theme.php
@@ -661,7 +661,7 @@
  * @param string $stylesheet Stylesheet name
  */
 function switch_theme( $stylesheet ) {
-	global $wp_theme_directories, $sidebars_widgets;
+	global $sidebars_widgets;
 
 	if ( is_array( $sidebars_widgets ) )
 		set_theme_mod( 'sidebars_widgets', array( 'time' => time(), 'data' => $sidebars_widgets ) );
@@ -679,10 +679,8 @@
 	update_option( 'template', $template );
 	update_option( 'stylesheet', $stylesheet );
 
-	if ( count( $wp_theme_directories ) > 1 ) {
-		update_option( 'template_root', get_raw_theme_root( $template, true ) );
-		update_option( 'stylesheet_root', get_raw_theme_root( $stylesheet, true ) );
-	}
+	update_option( 'template_root', get_raw_theme_root( $template, true ) );
+	update_option( 'stylesheet_root', get_raw_theme_root( $stylesheet, true ) );
 
 	$new_name  = $new_theme->get('Name');
 
