Index: includes/common.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/common.inc,v
retrieving revision 1.981
diff -u -p -r1.981 common.inc
--- includes/common.inc	31 Aug 2009 18:43:12 -0000	1.981
+++ includes/common.inc	8 Sep 2009 15:24:05 -0000
@@ -4048,7 +4048,7 @@ function drupal_render(&$elements) {
   }
 
   // Try to fetch the element's markup from cache and return.
-  if ($cached_output = drupal_render_cache_get($elements)) {
+  if (isset($elements['#cache']) && $cached_output = drupal_render_cache_get($elements)) {
     return $cached_output;
   }
 
