Do not use deepcopy since swig objects do not have a copy method.