Better executeRule implementation.
Fixes #2968.
Merge branch 'master' of git://github.com/yiisoft/yii2