apply patch in reverse order when patching fails