As pointed out in rB02b1a209be88 comment, the BKE_main_collection_sync should be after "nothing to duplicate" early-out.