Index: plugins/views_plugin_style.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/views/plugins/views_plugin_style.inc,v
retrieving revision 1.8
diff -u -p -r1.8 views_plugin_style.inc
--- plugins/views_plugin_style.inc	21 Sep 2009 21:36:32 -0000	1.8
+++ plugins/views_plugin_style.inc	24 Sep 2009 22:47:09 -0000
@@ -183,24 +183,23 @@ class views_plugin_style extends views_p
    *   The grouped record set.
    */
   function render_grouping($records, $grouping_field = '') {
+    // Make sure fields are rendered
+    $this->render_fields($this->view->result);
     $sets = array();
     if ($grouping_field) {
-      $this->view->row_index = 0;
-      foreach ($records as $row) {
+      foreach ($records as $index => $row) {
         $grouping = '';
         // Group on the rendered version of the field, not the raw.  That way,
         // we can control any special formatting of the grouping field through
         // the admin or theme layer or anywhere else we'd like.
         if (isset($this->view->field[$grouping_field])) {
-          $grouping = $this->view->field[$grouping_field]->theme($row);
-          $this->view->row_index++;
+          $grouping = $this->get_field($index, $grouping_field);
           if ($this->view->field[$grouping_field]->options['label']) {
             $grouping = $this->view->field[$grouping_field]->options['label'] . ': ' . $grouping;
           }
         }
         $sets[$grouping][] = $row;
       }
-      unset($this->view->row_index);
     }
     else {
       // Create a single group with an empty grouping field.
@@ -209,6 +208,51 @@ class views_plugin_style extends views_p
     return $sets;
   }
 
+  /**
+   * Render all of the fields for a given style and store them on the object.
+   *
+   * @param $result
+   *   The result array from $view->result
+   */
+  function render_fields($result) {
+    if (!$this->uses_fields()) {
+      return;
+    }
+
+    $start = views_microtime();
+    if (isset($this->rendered_fields)) {
+      return $this->rendered_fields;
+    }
+
+    $this->view->row_index = 0;
+    $keys = array_keys($this->view->field);
+    foreach ($result as $count => $row) {
+      foreach ($keys as $id) {
+        $this->rendered_fields[$count][$id] = $this->view->field[$id]->theme($row);
+      }
+      $this->view->row_index = $count;
+    }
+    unset($this->view->row_index);
+  }
+
+  /**
+   * Get a rendered field.
+   *
+   * @param $index
+   *   The index count of the row.
+   * @param $field
+   *    The id of the field.
+   */
+  function get_field($index, $field) {
+    if (!isset($this->rendered_fields)) {
+      $this->render_fields($this->view->result);
+    }
+
+    if (isset($this->rendered_fields[$index][$field])) {
+      return $this->rendered_fields[$index][$field];
+    }
+  }
+
   function validate() {
     $errors = parent::validate();
 
Index: theme/theme.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/views/theme/theme.inc,v
retrieving revision 1.83
diff -u -p -r1.83 theme.inc
--- theme/theme.inc	21 Sep 2009 21:40:27 -0000	1.83
+++ theme/theme.inc	24 Sep 2009 22:47:10 -0000
@@ -167,7 +167,7 @@ function template_preprocess_views_view_
   $vars['fields'] = array(); // ensure it's at least an empty array.
   foreach ($view->field as $id => $field) {
     // render this even if set to exclude so it can be used elsewhere.
-    $field_output = $view->field[$id]->theme($vars['row']);
+    $field_output = $view->style_plugin->get_field($view->row_index, $id);
     $empty = $field_output !== 0 && empty($field_output);
     if (empty($field->options['exclude']) && (!$empty || empty($field->options['hide_empty']))) {
       $object = new stdClass();
@@ -301,16 +301,7 @@ function template_preprocess_views_view_
 
   // Fields must be rendered in order as of Views 2.3, so we will pre-render
   // everything.
-  $renders = array();
-  $view->row_index = 0;
-  $keys = array_keys($view->field);
-  foreach ($result as $count => $row) {
-    foreach ($keys as $id) {
-      $renders[$count][$id] = $view->field[$id]->theme($row);
-    }
-    $view->row_index = $count;
-  }
-  unset($view->row_index);
+  $renders = $handler->render_fields();
 
   foreach ($columns as $field => $column) {
     // render the header labels
