Index: wp-admin/network/site-themes.php
===================================================================
--- wp-admin/network/site-themes.php	(revision 21273)
+++ wp-admin/network/site-themes.php	(working copy)
@@ -58,8 +58,7 @@
 $is_main_site = is_main_site( $id );
 
 if ( $action ) {
-	switch_to_blog( $id );
-	$allowed_themes = get_option( 'allowedthemes' );
+	$allowed_themes = get_blog_option( $id, 'allowedthemes' );
 
 	switch ( $action ) {
 		case 'enable':
@@ -110,8 +109,7 @@
 			break;
 	}
 
-	update_option( 'allowedthemes', $allowed_themes );
-	restore_current_blog();
+	update_blog_option( $id, 'allowedthemes', $allowed_themes );
 
 	wp_safe_redirect( add_query_arg( array( 'id' => $id, $action => $n ), $referer ) );
 	exit;
