diff --git includes/query.inc includes/query.inc
index fcb6317..170a6aa 100644
--- includes/query.inc
+++ includes/query.inc
@@ -115,8 +115,20 @@ class views_query {
    * Set the base field to be distinct.
    */
   function set_distinct($value = TRUE) {
-    if (!(isset($this->no_distinct) && $value)) {
-      $this->distinct = $value;
+    if (!(isset($this->no_distinct))) {
+      // Hack in a check to see if node_access is going to add its own DISTINCT
+      // and break this query.
+      // See http://drupal.org/node/284392 for the core bug.
+      //
+      // We want to bypass views distinct code if this bug will be triggered so
+      // if the base table is node and there is a node access module, bypass
+      // views distinct code.
+      if ($this->base_table != 'node' || !node_access_view_all_nodes()) {
+        $this->distinct = FALSE;
+      }
+      else {
+        $this->distinct = $value;
+      }
     }
   }
 
