Fix logic in api.v2.base.Controller._is_visible

Fix accessing yet unassigned local variable in case
exception is thrown.

fixes bug 1181718

Change-Id: Iea8f0cc252c1d2105cc696d917a347aa10b206a8
Merge "Fix logic in api.v2.base.Controller._is_visible"