diff --git patches/drupal_get_filename-caching.patch patches/drupal_get_filename-caching.patch
index e94688c..c8f6465 100644
--- patches/drupal_get_filename-caching.patch
+++ patches/drupal_get_filename-caching.patch
@@ -2,12 +2,12 @@ Index: includes/bootstrap.inc
 ===================================================================
 --- includes/bootstrap.inc	(revision 0)
 +++ includes/bootstrap.inc	(working copy)
-@@ -422,13 +422,29 @@
+@@ -500,13 +500,29 @@ function conf_init() {
   */
  function drupal_get_filename($type, $name, $filename = NULL) {
    static $files = array();
 +  static $cache_exists;
- 
++
 +  if (!isset($cache_exists)) {
 +    $cache_exists = function_exists('cache_get');
 +  }
@@ -18,7 +18,7 @@ Index: includes/bootstrap.inc
 +      $files = $cache->data;
 +    }
 +  }
-+
+ 
    if (!isset($files[$type])) {
      $files[$type] = array();
    }
@@ -32,7 +32,7 @@ Index: includes/bootstrap.inc
    }
    elseif (isset($files[$type][$name])) {
      // nothing
-@@ -439,6 +455,9 @@
+@@ -517,6 +533,9 @@ function drupal_get_filename($type, $name, $filename = NULL) {
    // when a database connection fails.
    elseif (db_is_active() && (($file = db_result(db_query("SELECT filename FROM {system} WHERE name = '%s' AND type = '%s'", $name, $type))) && file_exists($file))) {
      $files[$type][$name] = $file;
diff --git patches/module_implements-caching.patch patches/module_implements-caching.patch
index af62d9e..492bca2 100644
--- patches/module_implements-caching.patch
+++ patches/module_implements-caching.patch
@@ -2,12 +2,12 @@ Index: includes/module.inc
 ===================================================================
 --- includes/module.inc        (revision 0)
 +++ includes/module.inc        (working copy)
-@@ -403,8 +403,29 @@
+@@ -415,8 +415,29 @@ function module_hook($module, $hook) {
   */
  function module_implements($hook, $sort = FALSE, $refresh = FALSE) {
    static $implementations;
 +  static $cache_exists;
- 
++
 +  if (!isset($cache_exists)) {
 +    $cache_exists = function_exists('cache_get');
 +  }
@@ -24,7 +24,7 @@ Index: includes/module.inc
 +      }
 +    }
 +  }
-+
+ 
    if ($refresh) {
 +    if ($cache_exists) {
 +      cache_clear_all('module_implements', 'cache');
@@ -32,7 +32,7 @@ Index: includes/module.inc
      $implementations = array();
      return;
    }
-@@ -417,6 +438,10 @@
+@@ -429,6 +450,10 @@ function module_implements($hook, $sort = FALSE, $refresh = FALSE) {
          $implementations[$hook][] = $module;
        }
      }
diff --git patches/path_inc-variable-support.patch patches/path_inc-variable-support.patch
index 8aea44a..a87484c 100644
--- patches/path_inc-variable-support.patch
+++ patches/path_inc-variable-support.patch
@@ -2,7 +2,7 @@ Index: includes/bootstrap.inc
 ===================================================================
 --- includes/bootstrap.inc	(revision 0)
 +++ includes/bootstrap.inc	(working copy)
-@@ -1062,7 +1062,7 @@
+@@ -1212,7 +1212,7 @@ function _drupal_bootstrap($phase) {
        break;
  
      case DRUPAL_BOOTSTRAP_PATH:
diff --git patches/user_load-static-caching.patch patches/user_load-static-caching.patch
index 5007f41..7bbc709 100644
--- patches/user_load-static-caching.patch
+++ patches/user_load-static-caching.patch
@@ -2,14 +2,9 @@ Index: modules/user/user.module
 ===================================================================
 --- modules/user/user.module	(revision 0)
 +++ modules/user/user.module	(working copy)
-@@ -130,27 +130,84 @@
- /**
-  * Fetch a user object.
-  *
-- * @param $array
-+ * @param $conditions
-  *   An associative array of attributes to search for in selecting the
-  *   user, such as user name or e-mail address.
+@@ -136,15 +136,30 @@ function user_external_login($account, $edit = array()) {
+  *     uid, name, pass, mail, status) and whose values are the field's value.
+  *   - A numeric user ID.
   *
 + * @param $reset
 + *   Resets the internal cache for the first user object that is saved
@@ -22,38 +17,34 @@ Index: modules/user/user.module
 + *   cannot be loaded. When $conditions is empty and $reset is TRUE a
 + *   FALSE boolean is returned.
   */
--function user_load($array = array()) {
+-function user_load($user_info = array()) {
 -  // Dynamically compose a SQL query:
 -  $query = array();
 -  $params = array();
-+function user_load($conditions = array(), $reset = NULL) {
++function user_load($user_info = array(), $reset = NULL) {
 +  static $cache;
- 
--  if (is_numeric($array)) {
--    $array = array('uid' => $array);
++
 +  // Instantiate cache or reset cache when conditions are zero.
-+  if (!$cache || (empty($conditions) && $reset)) {
++  if (!$cache || (empty($user_info) && $reset)) {
 +    $cache = array();
 +    $cache['users'] = $cache['conditions'] = array();
-+
-+    if (empty($conditions)) {
+ 
++    if (empty($user_info)) {
 +      return FALSE;
 +    }
-   }
--  elseif (!is_array($array)) {
-+
-+  // Make sure $conditions is an array at all times or return FALSE.
-+  if (is_numeric($conditions)) {
-+    $conditions = array('uid' => $conditions);
 +  }
-+  elseif (!is_array($conditions)) {
++
++  // Make sure $user_info is an array at all times or return FALSE.
+   if (is_numeric($user_info)) {
+     $user_info = array('uid' => $user_info);
+   }
+@@ -152,6 +167,49 @@ function user_load($user_info = array()) {
      return FALSE;
    }
  
--  foreach ($array as $key => $value) {
 +  // Return user from cache if only uid was given.
-+  if (isset($conditions['uid']) && (count($conditions)==1) && !$reset) {
-+    $uid = $conditions['uid'];
++  if (isset($user_info['uid']) && (count($user_info)==1) && !$reset) {
++    $uid = $user_info['uid'];
 +    if (isset($cache['users'][$uid])) {
 +      return $cache['users'][$uid];
 +    }
@@ -61,7 +52,7 @@ Index: modules/user/user.module
 +
 +  // Try to match the exact condition set and return from cache.
 +  $uid_matches = array();
-+  foreach ($conditions as $key => $value) {
++  foreach ($user_info as $key => $value) {
 +    if ($key == 'uid') continue;
 +    if (isset($cache['conditions'][$key], $cache['conditions'][$key][$value])) {
 +
@@ -76,7 +67,8 @@ Index: modules/user/user.module
 +  }
 +
 +  if ($match_count = count($uid_matches)) {
-+    if ((array_sum($uid_matches) / $match_count) == $uid_matches[0]) { // Are all uid's in the array equal?
++    // Are all uid's in the array equal?
++    if ((array_sum($uid_matches) / $match_count) == $uid_matches[0]) {
 +      $uid = $uid_matches[0];
 +
 +      if (isset($cache['users'][$uid])) {
@@ -90,14 +82,13 @@ Index: modules/user/user.module
 +    }
 +  }
 +
-+  // Dynamically compose a SQL query.
++  // Dynamically compose a SQL query:
 +  $query = $params = array();
 +
-+  foreach ($conditions as $key => $value) {
+   foreach ($user_info as $key => $value) {
      if ($key == 'uid' || $key == 'status') {
        $query[] = "$key = %d";
-       $params[] = $value;
-@@ -164,10 +221,10 @@
+@@ -166,10 +224,10 @@ function user_load($user_info = array()) {
        $params[] = $value;
      }
    }
@@ -111,17 +102,15 @@ Index: modules/user/user.module
  
      $user->roles = array();
      if ($user->uid) {
-@@ -180,9 +237,30 @@
-     while ($role = db_fetch_object($result)) {
+@@ -183,8 +241,28 @@ function user_load($user_info = array()) {
        $user->roles[$role->rid] = $role->name;
      }
--    user_module_invoke('load', $array, $user);
-+    user_module_invoke('load', $conditions, $user);
+     user_module_invoke('load', $user_info, $user);
 +
 +    // Save the uid of the object in the conditions cache,
 +    // we group the database keys, then their values so we
 +    // have a unique match at all times.
-+    foreach ($conditions as $key => $value) {
++    foreach ($user_info as $key => $value) {
 +      if (!isset($cache['conditions'][$key][$value])) {
 +        $cache['conditions'][$key][$value] = array();
 +      }
@@ -134,16 +123,15 @@ Index: modules/user/user.module
 +    $cache['users'][$user->uid] = $user;
    }
    else {
-+    if (isset($conditions['uid'])) {
-+      $uid = $conditions['uid'];
-+      if (isset($cache['users'][$uid])) {
-+        unset($cache['users'][$uid]);
++    if (isset($user_info['uid'])) {
++      if (isset($cache['users'][$user_info['uid']])) {
++        unset($cache['users'][$user_info['uid']]);
 +      }
 +    }
      $user = FALSE;
    }
  
-@@ -276,7 +354,7 @@
+@@ -278,7 +356,7 @@ function user_save($account, $array = array(), $category = 'account') {
      }
  
      // Refresh user object.
@@ -152,7 +140,7 @@ Index: modules/user/user.module
  
      // Send emails after we have the new user object.
      if (isset($array['status']) && $array['status'] != $account->status) {
-@@ -333,7 +411,7 @@
+@@ -335,7 +413,7 @@ function user_save($account, $array = array(), $category = 'account') {
  
      // Build the initial user object.
      $array['uid'] = db_last_insert_id('users', 'uid');
@@ -161,7 +149,7 @@ Index: modules/user/user.module
  
      user_module_invoke('insert', $array, $user, $category);
  
-@@ -357,7 +435,7 @@
+@@ -359,7 +437,7 @@ function user_save($account, $array = array(), $category = 'account') {
      }
  
      // Build the finished user object.
@@ -170,15 +158,15 @@ Index: modules/user/user.module
    }
  
    // Save distributed authentication mappings.
-@@ -1594,6 +1672,7 @@
+@@ -1646,6 +1724,7 @@ function user_delete($edit, $uid) {
    db_query('DELETE FROM {users} WHERE uid = %d', $uid);
    db_query('DELETE FROM {users_roles} WHERE uid = %d', $uid);
    db_query('DELETE FROM {authmap} WHERE uid = %d', $uid);
 +  user_load($uid, TRUE); // Update user_load()'s cache.
    $variables = array('%name' => $account->name, '%email' => '<'. $account->mail .'>');
    watchdog('user', 'Deleted user: %name %email.', $variables, WATCHDOG_NOTICE);
-   module_invoke_all('user', 'delete', $edit, $account);
-@@ -2252,6 +2331,7 @@
+   user_module_invoke('delete', $edit, $account);
+@@ -2308,6 +2387,7 @@ function user_block_user_action(&$object, $context = array()) {
      $uid = $user->uid;
    }
    db_query("UPDATE {users} SET status = 0 WHERE uid = %d", $uid);
