diff --git a/plugins/views_plugin_style.inc b/plugins/views_plugin_style.inc
index d355e1b..0e87327 100644
--- a/plugins/views_plugin_style.inc
+++ b/plugins/views_plugin_style.inc
@@ -309,6 +309,20 @@ class views_plugin_style extends views_plugin {
   }
 
   /**
+   * Renders a single group of a grouped view.
+   *
+   * @return array
+   *   The render array containing the single view theme output.
+   */
+  function render_row_group($rows = array()) {
+    return array(
+      '#theme' => $this->theme_functions(),
+      '#view' => $this->view,
+      '#rows' => $rows,
+    );
+  }
+
+  /**
    * Render the display in this style.
    */
   function render() {
@@ -365,14 +379,11 @@ class views_plugin_style extends views_plugin {
           }
         }
 
-        $output .= theme($this->theme_functions(),
-          array(
-            'view' => $this->view,
-            'options' => $this->options,
-            'grouping_level' => $level,
-            'rows' => $set['rows'],
-            'title' => $set['group'])
-        );
+        $single_output = $this->render_row_group($set['rows']);
+        $single_output['#grouping_level'] = $level;
+        $single_output['#title'] = $set['group'];
+        $output .= drupal_render($single_output);
+
       }
     }
     unset($this->view->row_index);
