Fix bug with register methods on object.

I believe you intended to iterate over the `__`, `__n`, etc. method names here, not iterate over a method itself. =)