diff --git a/entity.test b/entity.test
index 03c2551..d373039 100644
--- a/entity.test
+++ b/entity.test
@@ -162,6 +162,13 @@ class EntityAPITestCase extends EntityWebTestCase {
     $this->assertEqual($revision->revision_id, $entity_third_revision->revision_id, 'Revision successfully loaded.');
     $this->assertFalse($revision->default_revision, 'Entity revision is not marked as default revision after loading.');
 
+    // Load not default revision after loading all entities. Revisions are not
+    // statically cached, and require a different query to other conditions, so
+    // cache should not be used.
+    $entities_all = entity_load('entity_test2');
+    $revision = entity_revision_load('entity_test2', $entity_third_revision->revision_id);
+    $this->assertEqual($revision->revision_id, $entity_third_revision->revision_id, 'Revision successfully loaded after filling static cache.');
+
     // Save not default revision.
     $entity_third_revision->title = 'third revision updated';
     $entity_third_revision->field_text[LANGUAGE_NONE][0]['value'] = 'third revision text updated';
diff --git a/includes/entity.controller.inc b/includes/entity.controller.inc
index f675a63..a827e26 100644
--- a/includes/entity.controller.inc
+++ b/includes/entity.controller.inc
@@ -244,7 +244,7 @@ class EntityAPIController extends DrupalDefaultEntityController implements Entit
     // Load any remaining entities from the database. This is the case if $ids
     // is set to FALSE (so we load all entities), if there are any ids left to
     // load or if loading a revision.
-    if (!($this->cacheComplete && $ids === FALSE && !$conditions) && ($ids === FALSE || $ids || $revision_id)) {
+    if ((!($this->cacheComplete && $ids === FALSE && !$conditions) && ($ids === FALSE || $ids)) || $revision_id) {
       $queried_entities = array();
       foreach ($this->query($ids, $conditions, $revision_id) as $record) {
         // Skip entities already retrieved from cache.
