[TypeCast] Add deep copy support for variables.