diff --git includes/common.inc includes/common.inc
index ea0a4ae..740fcac 100644
--- includes/common.inc
+++ includes/common.inc
@@ -7352,9 +7352,29 @@ function entity_extract_ids($entity_type, $entity) {
   // Objects being created might not have id/vid yet.
   $id = isset($entity->{$info['entity keys']['id']}) ? $entity->{$info['entity keys']['id']} : NULL;
   $vid = ($info['entity keys']['revision'] && isset($entity->{$info['entity keys']['revision']})) ? $entity->{$info['entity keys']['revision']} : NULL;
-  // If no bundle key provided, then we assume a single bundle, named after the
-  // entity type.
-  $bundle = $info['entity keys']['bundle'] ? $entity->{$info['entity keys']['bundle']} : $entity_type;
+
+  if (!empty($info['entity keys']['bundle'])) {
+    $bundle = $entity->{$info['entity keys']['bundle']};
+    // Explicitly fail for malformed entites missing the bundle property.
+    if (is_null($bundle)) {
+      $funcs = array();
+      $backtrace = debug_backtrace();
+      $short_backtrace = array_slice($backtrace, 0, 10);
+      foreach ($short_backtrace as $info) {
+        $funcs[] = $info['function'];
+      }
+      if (count($backtrace) > 10) {
+        $funcs[] = '[...]';
+      }
+      throw new Exception(t('Encountered an entity without a bundle property (entity type: @entity_type, callstack: @callstack).', array('@entity_type' => $entity_type, '@callstack' => implode(', ', $funcs))));
+    }
+  }
+  else {
+    // The entity type provides no bundle key: assume a single bundle, named
+    // after the entity type.
+    $bundle = $entity_type;
+  }
+
   return array($id, $vid, $bundle);
 }
 
