diff --git a/relation.module b/relation.module
index 52a01de..32310fd 100644
--- a/relation.module
+++ b/relation.module
@@ -895,7 +895,8 @@ function relation_get_related_entity($entity_type, $entity_id, $relation_type =
     $entities = $items[$cache_key];
   }
   else if ($cached = cache_get('relation:' . $cache_key)) {
-    $entities = $items[$cache_key];
+    $entities = $cached->data;
+    $items[$cache_key] = $entities;
   }
   else {
     $query = relation_query($entity_type, $entity_id, $r_index);
diff --git a/tests/relation.test b/tests/relation.test
index 24d46cc..46054fd 100644
--- a/tests/relation.test
+++ b/tests/relation.test
@@ -259,6 +259,10 @@ class RelationAPITestCase extends RelationTestCase {
     $related = relation_get_related_entity('node', $this->node4->nid);
     $this->assertEqual($this->node1->nid, $related->nid);
 
+    // Confirm this works once the related entity has been cached.
+    $related = relation_get_related_entity('node', $this->node4->nid);
+    $this->assertEqual($this->node1->nid, $related->nid);
+
     // Directional.
     // From Parent to Grandparent.
     $related = relation_get_related_entity('node', $this->node3->nid, $this->relation_types['directional']['relation_type'], 1);
