Fix cmap handling in structure copy.