Removes redundant patches.