Add a minimal regression test for 3 way merge
plug memory leak in 3way merge test