If by 'garbage id' you mean the instant ids of the form __export__.res_partner_69, this bug is right there where it generates them. Note that they linger around in the ir_model_data table and as such refer to possibly nonexisting records.
If by 'garbage id' you mean the instant ids of the form __export_ _.res_partner_ 69, this bug is right there where it generates them. Note that they linger around in the ir_model_data table and as such refer to possibly nonexisting records.