apply a patch by wrapping instead of overwriting