dataset.Merge: various fixes, extend tests