Error with MergeSamFiles

While merging bam files (output from alignment) I got the error The tool was executed with one or more duplicate input datasets. This frequently results in tool errors due to problematic input choices.

But I don’t have any duplicate input dataset there. 3 dataset was aligned with my account, and my teammate did another three. Then she shared her history with me. I set the read groups using AddorReplaceReadGroups tool for mine together and those of her in a second run.
Here is the params I used-

Then I tried to merge them but got the error-

Got the answer submitting the bug report. It was due to different alignment files using different reference genome.