diff --git a/plugins/tasks/site_template.inc b/plugins/tasks/site_template.inc
index 939d421..d56a102 100644
--- a/plugins/tasks/site_template.inc
+++ b/plugins/tasks/site_template.inc
@@ -82,18 +82,30 @@ function panels_everywhere_site_template_get_base_contexts($task, $subtask, $pla
     // this.
     if ($page) {
       $node = _panels_everywhere_find_context($page['contexts'], 'node');
+      // If the node object is a node form then blank out the context and
+      // replace it with a generic object. This is to work around a limitation
+      // in Panels and may introduce regressions.
+      if ($form_context = ctools_context_get_form(array($node))) {
+        $node = ctools_context_create_empty('node');
+      }
       $account = _panels_everywhere_find_context($page['contexts'], 'user');
 
       // We're already including the logged in user. We don't want that to
       // accidentally show up as the user being viewed if we're doing
       // something unrelated and the logged in user was added as a context.
-      if (isset($account->data->logged_in_user)) {
+      if (isset($account->data->logged_in_user) || in_array('authenticated user', $account->data->roles)) {
         $account = ctools_context_create_empty('user');
       }
 
       // This context will only be loaded if the Taxonomy module is loaded.
       if ($load_taxonomy) {
         $term = _panels_everywhere_find_context($page['contexts'], 'entity:taxonomy_term');
+        // If the term object is a term form then blank out the context and
+        // replace it with a generic object. This is to work around a limitation
+        // in Panels and may introduce regressions.
+        if ($form_context = ctools_context_get_form(array($term))) {
+          $term = ctools_context_create_empty('entity:taxonomy_term');
+        }
       }
     }
     else {
