Index: webform.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/webform/webform.module,v
retrieving revision 1.113.2.70.2.99
diff -u -p -r1.113.2.70.2.99 webform.module
--- webform.module	15 Oct 2009 01:26:36 -0000	1.113.2.70.2.99
+++ webform.module	29 Oct 2009 16:09:34 -0000
@@ -1997,13 +1997,16 @@ function _webform_filter_values($string,
     $replacements['unsafe']['%username'] = isset($user->name) ? $user->name : '';
     $replacements['unsafe']['%useremail'] = isset($user->mail) ? $user->mail : '';
     $replacements['unsafe']['%ip_address'] = isset($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR'];
+
+    // Doesn't really belong here with user things, but works.
+    $special_tokens['unsafe']['%server'] = $_SERVER;
+  }
+
+  if (!isset($replacements['unsafe']['%profile[uid]'])) {
     if ($user->uid && module_exists('profile')) {
       profile_load_profile($user);
     }
     $special_tokens['unsafe']['%profile'] = $user;
-
-    // Doesn't really belong here with user things, but works.
-    $special_tokens['unsafe']['%server'] = $_SERVER;
   }
 
   foreach ($special_tokens as $safe_state => $tokens) {
