Index: modules/user/user.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/user/user.module,v
retrieving revision 1.1073
diff -u -p -r1.1073 user.module
--- modules/user/user.module	23 Oct 2009 22:24:19 -0000	1.1073
+++ modules/user/user.module	28 Oct 2009 06:44:22 -0000
@@ -1584,7 +1584,8 @@ function user_uid_optional_load($uid = N
  * Return a user object after checking if any profile category in the path exists.
  */
 function user_category_load($uid, &$map, $index) {
-  static $user_categories, $accounts;
+  $user_categories = &drupal_static(__FUNCTION__);
+  $accounts = &drupal_static(__FUNCTION__ . ':accounts', array());
 
   // Cache $account - this load function will get called for each profile tab.
   if (!isset($accounts[$uid])) {
@@ -2952,7 +2953,7 @@ function _user_mail_notify($op, $account
  * strings that need to be passed to the javascript code.
  */
 function _user_password_dynamic_validation() {
-  static $complete = FALSE;
+  $complete = &drupal_static(__FUNCTION__, FALSE);
   global $user;
   // Only need to do once per page.
   if (!$complete) {
