Fixes #2122: CActiveRecord, lazy load: 'params' from relations used in 'through' option were not applied to the final SQL statement.
Merge pull request #2306 from resurtm/fixes-2122

Fixes #2122: CActiveRecord, lazy load: 'params' from relations used in 'through' option were not applied to the final SQL statement.