More tests and fix logic bug in recursive merge.