correct handling of local, nested, inner, anonymous, and proxied classes