Fix read-tree merging more than 3 trees using 3-way merge