diff --git a/lib/dm-core/query.rb b/lib/dm-core/query.rb
index <HASH>..<HASH> 100644
--- a/lib/dm-core/query.rb
+++ b/lib/dm-core/query.rb
@@ -625,7 +625,9 @@ module DataMapper
       properties = Set.new
 
       each_comparison do |comparison|
-        properties << comparison.subject if comparison.subject.kind_of?(Property)
+        next unless comparison.respond_to?(:subject)
+        subject = comparison.subject
+        properties << subject if subject.kind_of?(Property)
       end
 
       properties
Filter out non-comparison objects from Query#condition_properties