Index: includes/common.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/common.inc,v
retrieving revision 1.1030
diff -u -p -r1.1030 common.inc
--- includes/common.inc	24 Oct 2009 05:13:43 -0000	1.1030
+++ includes/common.inc	25 Oct 2009 05:04:08 -0000
@@ -4653,7 +4653,6 @@ function drupal_render_page($page) {
  *   The rendered HTML.
  */
 function drupal_render(&$elements) {
-  static $defaults;
   // Early-return nothing if user does not have access.
   if (!isset($elements) || (isset($elements['#access']) && !$elements['#access'])) {
     return;
@@ -4671,14 +4670,11 @@ function drupal_render(&$elements) {
 
   // If the default values for this element have not been loaded yet, populate
   // them.
-  if (isset($elements['#type']) && empty($elements['#defaults_loaded'])) {
-    $elements += element_info($elements['#type']);
-  }
-  else {
-    if (!isset($defaults)) {
-      $defaults = element_basic_defaults();
-    }
-    $elements += $defaults;
+  if (empty($elements['#defaults_loaded'])) {
+    $elements += element_info(isset($elements['#type']) ? $elements['#type'] : 'defaults');
+    // @todo: We probably want to set #defaults_loaded here, but need to
+    // evaluate performance impact of doing so.
+    //$elements['#defaults_loaded'] = TRUE;
   }
 
   // If #markup is not empty and no theme function is set, use theme_markup.
@@ -4965,30 +4961,30 @@ function element_info($type) {
   $cache = &drupal_static(__FUNCTION__);
 
   if (!isset($cache)) {
-    $basic_defaults = element_basic_defaults();
+    $basic_defaults = array(
+      '#description' => '',
+      '#title' => '',
+      '#attributes' => array(),
+      '#required' => FALSE,
+      '#attached' => array(),
+    );
+
+    // Load all the elements, keyed by their #type.
     $cache = module_invoke_all('element_info');
+
     foreach ($cache as $element_type => $info) {
       $cache[$element_type] = array_merge_recursive($basic_defaults, $info);
       $cache[$element_type]['#type'] = $element_type;
     }
+
+    // Add default properties.
+    $cache['defaults'] = $basic_defaults;
+
     // Allow modules to alter the element type defaults.
     drupal_alter('element_info', $cache);
   }
 
-  return isset($cache[$type]) ? $cache[$type] : array();
-}
-
-/**
- * Retrieve the basic default properties that are common to all elements.
- */
-function element_basic_defaults() {
-  return array(
-    '#description' => '',
-    '#title' => '',
-    '#attributes' => array(),
-    '#required' => FALSE,
-    '#attached' => array(),
-  );
+  return isset($cache[$type]) ? $cache[$type] : $cache['defaults'];
 }
 
 /**
Index: modules/image/image.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/image/image.admin.inc,v
retrieving revision 1.14
diff -u -p -r1.14 image.admin.inc
--- modules/image/image.admin.inc	16 Oct 2009 00:52:46 -0000	1.14
+++ modules/image/image.admin.inc	25 Oct 2009 05:04:08 -0000
@@ -818,7 +818,7 @@ function theme_image_anchor($variables) 
   $row = array();
   foreach (element_children($element) as $n => $key) {
     $element[$key]['#attributes']['title'] = $element[$key]['#title'];
-    unset($element[$key]['#title']);
+    $element[$key]['#title'] = '';
     $row[] = drupal_render($element[$key]);
     if ($n % 3 == 3 - 1) {
       $rows[] = $row;
Index: modules/simpletest/simpletest.pages.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/simpletest/simpletest.pages.inc,v
retrieving revision 1.19
diff -u -p -r1.19 simpletest.pages.inc
--- modules/simpletest/simpletest.pages.inc	20 Oct 2009 00:05:38 -0000	1.19
+++ modules/simpletest/simpletest.pages.inc	25 Oct 2009 05:04:09 -0000
@@ -139,7 +139,7 @@ function theme_simpletest_test_table($va
       $title = $test['#title'];
       $description = $test['#description'];
 
-      unset($test['#title']);
+      $test['#title'] = '';
       unset($test['#description']);
 
       // Test name is used to determine what tests to run.
Index: modules/system/system.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.admin.inc,v
retrieving revision 1.216
diff -u -p -r1.216 system.admin.inc
--- modules/system/system.admin.inc	19 Oct 2009 23:28:40 -0000	1.216
+++ modules/system/system.admin.inc	25 Oct 2009 05:04:09 -0000
@@ -2307,7 +2307,7 @@ function theme_system_modules_fieldset($
     // Stick it into $module for easier accessing.
     $module = $form[$key];
     $row = array();
-    unset($module['enable']['#title']);
+    $module['enable']['#title'] = '';
     $row[] = array('class' => array('checkbox'), 'data' => drupal_render($module['enable']));
     $label = '<label';
     if (isset($module['enable']['#id'])) {
