Fix undoing merges cleaning up mergedBuffers