Support deeply nested inner classes when searching classnames

Protobufs support deep message nesting, greater than one deep, but the
current inner class search implementation only looks one level deep and
gives up. This new method adds support for arbitrarily deep nesting.
Hopefully there are few cases where more than 2 levels are required
since this method is fairly expensive.