Bug in merging projects

I'm having a problem with the merging of two projects that seems caused by a bug in kdenlive 0.5.
After the merge kdenlive gets "unstable" in various operations.
It seems to me that the new project (the merge) gets uncorrect
ids in xml (ids are duplicated).
For examples i find


and it seems that the program gets confused to which is which...

I've had problems in finding the code that merges. I think it should get the max id from the
first file and then add this value to all the ids of the second but it doesn't seem to do like this.