avoid copying in merge_mixed