Index: token.module
===================================================================
--- token.module	(revision 2421)
+++ token.module	(working copy)
@@ -328,6 +328,12 @@
 
   token_include();
 
+  // Special-case global tokens, as we always want to be able to process
+  // those substitutions.
+  if (!isset($tokens['global']['default'])) {
+    $tokens['global']['default'] = module_invoke_all('token_values', 'global');
+  }
+
   $id = _token_get_id($type, $object);
   if ($id && isset($tokens[$type][$id])) {
     $tmp_tokens = $tokens[$type][$id];
@@ -337,12 +343,6 @@
     $tokens[$type][$id] = $tmp_tokens;
   }
 
-  // Special-case global tokens, as we always want to be able to process
-  // those substitutions.
-  if (!isset($tokens['global']['default'])) {
-    $tokens['global']['default'] = module_invoke_all('token_values', 'global');
-  }
-
   $all = array_merge($tokens['global']['default'], $tokens[$type][$id]);
 
   $result = new stdClass();

