Monkey patches that revert when they go out of scope