setting the table alias before applying scopes

this is to address this issue: https://github.com/yiisoft/yii/issues/1072 
in the current version, an alias applied by the CDbCriteria is not accessible...
i hope this helps