Java getProxyName() fix for nested classes
fixes the case when nested classes is forward declared