diff --git a/webform.module b/webform.module
index 93e7e95..d6fda3d 100644
--- a/webform.module
+++ b/webform.module
@@ -1849,7 +1849,23 @@ function webform_node_view($node, $view_mode) {
   }
 
   // Render the form and generate the output.
-  $form = !empty($node->webform['components']) ? drupal_get_form('webform_client_form_' . $node->nid, $node, $submission, $is_draft) : '';
+  if (!empty($node->webform['components'])) {
+    // Avoid rendering the same form twice on the same page request (which can
+    // happen if the webform is embedded in a panelized node), because this
+    // causes multistep forms to build incorrectly the second time.
+    $cached_forms = &drupal_static(__FUNCTION__, array());
+    $cache_id = $node->nid . ':' . $user->uid;
+    if (isset($cached_forms[$cache_id])) {
+      $form = $cached_forms[$cache_id];
+    }
+    else {
+      $form = drupal_get_form('webform_client_form_' . $node->nid, $node, $submission, $is_draft);
+      $cached_forms[$cache_id] = $form;
+    }
+  }
+  else {
+    $form = '';
+  }
 
   // Remove the surrounding <form> tag if this is a preview.
   if (!empty($node->in_preview)) {
