Make trace deepcopy a little more efficient.