Dbs3 migration hot fix

Hi Yuyi,

this patch fixes Stefano's problems with duplicated grand parents in the OrderedDict.

Could you review and merge, please?

Thanks,
Manuel