added replaced node for both conditions when merging an empty and a leaf node of an internal node