SELECT DISTINCT queries made subqueries in Query::queryScalar 

To me this makes sense. I'm open to feedback though if people know of unintended consequences to this change.