yiisoft/yii2 — pull request #2581 by jom (2014-02-28 00:10:36+00:00)
Title: 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.