The expectation that the values would be saved is not valid. The values will be restored if you undo the method change, but not if you change it and then change it back. It is analogous to deleting a behaviour and then re-adding it: values are not expected to be saved.