Fix merging ID bug with duplicate topics dita-ot/dita-ot#1528