diff --git a/views/revisioning_handler_filter_revision_state.inc b/views/revisioning_handler_filter_revision_state.inc
index a38e920..b05a10c 100644
--- a/views/revisioning_handler_filter_revision_state.inc
+++ b/views/revisioning_handler_filter_revision_state.inc
@@ -47,7 +47,7 @@ class revisioning_handler_filter_revision_state extends views_handler_filter_in_
           $subclauses[] = "($revisions_table.vid>$node_table.vid OR ($node_table.status=0 AND (SELECT COUNT(vid) FROM {" . $revisions_table . "} WHERE nid=$node_table.nid)=1))";
           // Only add this join if there is not already a 'Revision NID of the
           // content revision' contextual filter relationship.
-          if (empty($this->query->relationships[$this->relationship])) {
+          if (empty($this->query->relationships[$node_table])) {
             // Make sure UNIQUE is set!
             $this->query->table_queue[$revisions_table]['join'] = new views_join();
             $this->query->table_queue[$revisions_table]['join']->construct($node_table, $revisions_table, 'nid', 'nid');
