Allow instance methods to be wrapped and unwrapped correctly.

Change-Id: Ia29e0e8a54fa815dec88016a9444fe7cfad7b8ac
Merge "Allow instance methods to be wrapped and unwrapped correctly."
merging changes from origin

Change-Id: I8e43dab3a6d1118f239779c18695d4d4acb56435