Fix issue where a warning is always printed.
Support methods and fields with the same name.

We simply rewrite the field to _fieldName, then update references to it. This
will not work with public fields.