Traverse the whole hierarchy to find a non-hidden superclass.

When you have a hidden superclass it assumes that its own superclass
is okay to be hidden and just returns that when asked for an
available superclass. By asking the non-hidden subclass for its first
available superclass instead we ensure that we get an equivalently
available (i.e. non-hidden) one.

This happened to work before because nothing had a hidden hierarchy
with depth greater than 1.

Bug: 28793355
Change-Id: I9afd8f93bae1c04ba41a56a8ca8cfbda69d48df0
1 file changed