STS-3520: fixed lookup of anonymous inner classes for binary types