un-patching correctly when patching objects twice

fixes #2