Index: includes/theme.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/theme.inc,v
retrieving revision 1.606
diff -u -p -r1.606 theme.inc
--- includes/theme.inc	22 Aug 2010 12:46:21 -0000	1.606
+++ includes/theme.inc	5 Sep 2010 15:39:51 -0000
@@ -292,7 +292,7 @@ function _theme_load_registry($theme, $b
  * Write the theme_registry cache into the database.
  */
 function _theme_save_registry($theme, $registry) {
-  cache_set("theme_registry:$theme->name", $registry);
+  cache_set("theme_registry:$theme->name", $registry, 'cache_bootstrap');
 }
 
 /**
@@ -301,7 +301,13 @@ function _theme_save_registry($theme, $r
  * to add more theme hooks.
  */
 function drupal_theme_rebuild() {
-  cache_clear_all('theme_registry', 'cache', TRUE);
+  $cids = array();
+  $themes = list_themes();
+  foreach ($themes as $name => $theme) {
+    $cids[] = "theme_registry:$name";
+  }
+
+  cache_clear_all($cids, 'cache_bootstrap');
 }
 
 /**
@@ -2002,7 +2008,7 @@ function theme_indentation($variables) {
 
 /**
  * Returns HTML output for a single table cell for theme_table().
- * 
+ *
  * @param $cell
  *   Array of cell information, or string to display in cell.
  * @param bool $header
Index: modules/locale/locale.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/locale/locale.install,v
retrieving revision 1.65
diff -u -p -r1.65 locale.install
--- modules/locale/locale.install	27 Aug 2010 11:07:36 -0000	1.65
+++ modules/locale/locale.install	5 Sep 2010 15:39:51 -0000
@@ -36,6 +36,10 @@ function locale_install() {
  * Add context field index and allow longer location.
  */
 function locale_update_7000() {
+  // Drop 'textgroup_location' index if it has been added by i18n module.
+  if (db_index_exists('locales_source', 'textgroup_location')) {
+    db_drop_index('locales_source', 'textgroup_location');
+  }
   db_drop_index('locales_source', 'source');
   db_add_index('locales_source', 'source_context', array(array('source', 30), 'context'));
   db_change_field('locales_source', 'location', 'location', array('type' => 'text', 'size' => 'big', 'not null' => FALSE));
