Incorrect update of __wrapped__ on proxy object for C implementation.
Add __wrapped__ check for settattr and fix reference counting in C implementation of proxy object.