Reproduce:
- create a item with a statement, add two same references to it (e.g. https://test.wikidata.org/wiki/Q97744).
- create another item with same statement without references (e.g. https://test.wikidata.org/wiki/Q53752).
- try to merge the first item to the second one.
Expected:
The duplicated references will be discarded.
Actual:
Error "The statement has already a reference with hash ###"
Note merging an item with two identical statements with common references (e.g. https://test.wikidata.org/wiki/Q150012) also fails.