--- modules/system/system.module (saved version)
+++ (current document)
@@ -810,12 +810,15 @@
 /**
  * Collect data about all currently available themes.
  *
+ * @param $reset
+ *   Whether or not to reset the theme data.
+ *
  * @return
  *   Array of all available themes and their data.
  */
-function system_theme_data() {
+function system_theme_data($reset = FALSE) {
   // Scan the installation theme .info files and their engines.
-  $themes = _system_theme_data();
+  $themes = _system_theme_data($reset);
 
   // Extract current files from database.
   system_get_files_database($themes, 'theme');
@@ -836,13 +839,16 @@
 /**
  * Helper function to scan and collect theme .info data and their engines.
  *
+ * @param $reset
+ *   Whether or not to reset the theme data.
+ *
  * @return
  *   An associative array of themes information.
  */
-function _system_theme_data() {
+function _system_theme_data($reset = FALSE) {
   static $themes_info = array();
 
-  if (empty($themes_info)) {
+  if ($reset || empty($themes_info)) {
     // Find themes
     $themes = drupal_system_listing('\.info$', 'themes');
     // Find theme engines
