Fix bug: local variables in struct/class methods were detected as public variables.

Also detect forward references struct/classes, to avoid, to mark the
following "content" as public.