fix for tab throwing exception where its not needed.

This fixes the issue below
https://github.com/yiisoft/yii2/issues/5216