added guarantee that patchToValue(valuetoPatch(<some value>)) == <some value>