for ref in list(submodel.references):
                    submodel.references.remove(ref)
                    merged_submodel.references.append(ref)