diff --git a/dmemcache.inc b/dmemcache.inc
index 827ed31..1976a53 100644
--- a/dmemcache.inc
+++ b/dmemcache.inc
@@ -143,7 +143,15 @@ function dmemcache_get_multi($keys, $bin = 'cache', $mc = NULL) {
   if (!$results) {
     $results = array();
   }
-  return $results;
+
+  // Convert the full keys back to the cid.
+  $cid_results = array();
+  foreach ($results as $value) {
+    if (is_object($value)) {
+      $cid_results[$value->cid] = $value;
+    }
+  }
+  return $cid_results;
 }
 
 /**
diff --git a/memcache.inc b/memcache.inc
index 7718880..26cc9db 100644
--- a/memcache.inc
+++ b/memcache.inc
@@ -32,12 +32,10 @@ class MemCacheDrupal implements DrupalCacheInterface {
         // This object has expired, so don't return it.
         unset($results[$cid]);
       }
-      else {
-        // Remove items from the referenced $cids array that we are returning,
-        // per the comment in cache_get_multiple() in includes/cache.inc.
-        unset($cids[$result->cid]);
-      }
     }
+    // Remove items from the referenced $cids array that we are returning,
+    // per the comment in cache_get_multiple() in includes/cache.inc.
+    $cids = array_diff($cids, array_keys($results));
     return $results;
   }
 
