diff --git a/core/includes/bootstrap.inc b/core/includes/bootstrap.inc
index 35c9e0c..e2802e1 100644
--- a/core/includes/bootstrap.inc
+++ b/core/includes/bootstrap.inc
@@ -3309,8 +3309,10 @@ function &drupal_static($name, $default_value = NULL, $reset = FALSE) {
   // Reset all: ($name == NULL). This needs to be done one at a time so that
   // references returned by earlier invocations of drupal_static() also get
   // reset.
-  foreach ($default as $name => $value) {
-    $data[$name] = $value;
+  if ($reset) {
+    foreach ($default as $name => $value) {
+      $data[$name] = $value;
+    }
   }
   // As the function returns a reference, the return should always be a
   // variable.
diff --git a/core/includes/common.inc b/core/includes/common.inc
index c117d43..a422989 100644
--- a/core/includes/common.inc
+++ b/core/includes/common.inc
@@ -1872,12 +1872,9 @@ function format_interval($timestamp, $granularity = 2, $langcode = NULL) {
  *   A translated date string in the requested format.
  */
 function format_date($timestamp, $type = 'medium', $format = '', $timezone = NULL, $langcode = NULL) {
-  // Use the advanced drupal_static() pattern, since this is called very often.
-  static $drupal_static_fast;
-  if (!isset($drupal_static_fast)) {
-    $drupal_static_fast['timezones'] = &drupal_static(__FUNCTION__);
-  }
-  $timezones = &$drupal_static_fast['timezones'];
+  // Internal PHP time zone information is not expected to change within a
+  // single request.
+  static $timezones;
 
   if (!isset($timezone)) {
     $timezone = date_default_timezone_get();
@@ -7172,7 +7169,8 @@ function drupal_write_record($table, &$record, $primary_keys = array()) {
  * @see drupal_parse_info_format()
  */
 function drupal_parse_info_file($filename) {
-  $info = &drupal_static(__FUNCTION__, array());
+  // .info files on disc should not change within a single request.
+  static $info = array();
 
   if (!isset($info[$filename])) {
     if (!file_exists($filename)) {
diff --git a/core/includes/form.inc b/core/includes/form.inc
index 3469377..9300cae 100644
--- a/core/includes/form.inc
+++ b/core/includes/form.inc
@@ -2458,9 +2458,9 @@ function form_set_value($element, $value, &$form_state) {
  *   An array with all hierarchical elements flattened to a single array.
  */
 function form_options_flatten($array) {
-  // Always reset static var when first entering the recursion.
-  drupal_static_reset('_form_options_flatten');
-  return _form_options_flatten($array);
+  $flat = array();
+  _form_options_flatten($array, $flat);
+  return $flat;
 }
 
 /**
@@ -2470,22 +2470,18 @@ function form_options_flatten($array) {
  * array that has removed duplicate keys. Also handles cases where objects
  * are passed as array values.
  */
-function _form_options_flatten($array) {
-  $return = &drupal_static(__FUNCTION__);
-
+function _form_options_flatten($array, &$return) {
   foreach ($array as $key => $value) {
     if (is_object($value)) {
-      _form_options_flatten($value->option);
+      _form_options_flatten($value->option, $return);
     }
     elseif (is_array($value)) {
-      _form_options_flatten($value);
+      _form_options_flatten($value, $return);
     }
     else {
       $return[$key] = 1;
     }
   }
-
-  return $return;
 }
 
 /**
diff --git a/core/modules/simpletest/tests/bootstrap.test b/core/modules/simpletest/tests/bootstrap.test
index 13fdf07..2b235c2 100644
--- a/core/modules/simpletest/tests/bootstrap.test
+++ b/core/modules/simpletest/tests/bootstrap.test
@@ -404,8 +404,8 @@ class BootstrapResettableStaticTestCase extends DrupalUnitTestCase {
 
   public static function getInfo() {
     return array(
-      'name' => 'Resettable static variables test',
-      'description' => 'Test that drupal_static() and drupal_static_reset() work.',
+      'name' => 'Resettable static variables',
+      'description' => 'Tests drupal_static() and drupal_static_reset().',
       'group' => 'Bootstrap',
     );
   }
@@ -416,23 +416,55 @@ class BootstrapResettableStaticTestCase extends DrupalUnitTestCase {
    */
   function testDrupalStatic() {
     $name = __CLASS__ . '_' . __METHOD__;
-    $var = &drupal_static($name, 'foo');
-    $this->assertEqual($var, 'foo', t('Variable returned by drupal_static() was set to its default.'));
-
-    // Call the specific reset and the global reset each twice to ensure that
-    // multiple resets can be issued without odd side effects.
-    $var = 'bar';
+    $default_value = 'default';
+    $changed_value = 'changed';
+
+    // Initialize the static variable.
+    $var = &drupal_static($name, $default_value);
+    $this->assertEqual($var, $default_value, t('Variable returned by drupal_static() was set to its default.'));
+
+    // Change the value, verify that the static has changed, reset it, verify
+    // that it is back to the default, and verify that multiple resets can be
+    // issued without unexpected side effects.
+    $var = $changed_value;
+    $this->assertStaticValue($name, $changed_value);
     drupal_static_reset($name);
-    $this->assertEqual($var, 'foo', t('Variable was reset after first invocation of name-specific reset.'));
-    $var = 'bar';
+    $this->assertStaticValue($name, $default_value);
+    $this->assertIdentical($var, $default_value, t('Variable was reset after first invocation of name-specific reset.'));
+
+    $var = $changed_value;
+    $this->assertStaticValue($name, $changed_value);
     drupal_static_reset($name);
-    $this->assertEqual($var, 'foo', t('Variable was reset after second invocation of name-specific reset.'));
-    $var = 'bar';
+    $this->assertStaticValue($name, $default_value);
+    $this->assertIdentical($var, $default_value, t('Variable was reset after second invocation of name-specific reset.'));
+
+    // Same procedure, but resetting all statics.
+    $var = $changed_value;
+    $this->assertStaticValue($name, $changed_value);
     drupal_static_reset();
-    $this->assertEqual($var, 'foo', t('Variable was reset after first invocation of global reset.'));
-    $var = 'bar';
+    $this->assertStaticValue($name, $default_value);
+    $this->assertIdentical($var, $default_value, t('Variable was reset after first invocation of global reset.'));
+
+    $var = $changed_value;
+    $this->assertStaticValue($name, $changed_value);
     drupal_static_reset();
-    $this->assertEqual($var, 'foo', t('Variable was reset after second invocation of global reset.'));
+    $this->assertStaticValue($name, $default_value);
+    $this->assertIdentical($var, $default_value, t('Variable was reset after second invocation of global reset.'));
+
+    // Verify that all statics can be retrieved without resetting.
+    $var = $changed_value;
+    $this->assertStaticValue($name, $changed_value);
+    $all = drupal_static(NULL, NULL, FALSE);
+    $this->assertIdentical($all[$name], $changed_value);
+    $this->assertStaticValue($name, $changed_value);
+  }
+
+  /**
+   * Asserts that a static variable has the expected value.
+   */
+  function assertStaticValue($name, $expected) {
+    $var = &drupal_static($name);
+    $this->assertIdentical($var, $expected);
   }
 }
 
