diff --git a/feeds.tokens.inc b/feeds.tokens.inc
index a5145b6..eaf0365 100644
--- a/feeds.tokens.inc
+++ b/feeds.tokens.inc
@@ -29,21 +29,18 @@ function feeds_tokens($type, $tokens, array $data, array $options) {
 
     $sanitize = !empty($options['sanitize']);
 
-    $feed_nid = feeds_get_feed_nid($data['node']->nid, 'node');
-
-    if ($feed_nid && $feed_source = node_load($feed_nid)) {
-      foreach ($tokens as $name => $original) {
-        switch ($name) {
-          case 'feed-source':
-            $replacements[$original] = $sanitize ? check_plain($feed_source->title) : $feed_source->title;
-            break;
-        }
+    // Check if the feeds-source token is requested.
+    if (isset($tokens['feed-source'])) {
+      // Try to load the feed_nid.
+      $feed_nid = feeds_get_feed_nid($data['node']->nid, 'node');
+      if ($feed_nid && $feed_source = node_load($feed_nid)) {
+        $replacements[$tokens['feed-source']] = $sanitize ? check_plain($feed_source->title) : $feed_source->title;
       }
+    }
 
-      // Chained node token relationships.
-      if ($feed_source_tokens = token_find_with_prefix($tokens, 'feed-source')) {
-        $replacements += token_generate('node', $feed_source_tokens, array('node' => $feed_source), $options);
-      }
+    // Chained node token relationships.
+    if ($feed_source_tokens = token_find_with_prefix($tokens, 'feed-source')) {
+      $replacements += token_generate('node', $feed_source_tokens, array('node' => $feed_source), $options);
     }
   }
 
