Metaterms are treated like normal variables. Their attributes are copied as specified by the corresponding copy_term handler.
Subterms that do not contain any of the variables to replace are not physically copied.
Note that when the structure of the term to be copied is known, then it is more efficient to use specialised unification code to do the job.
[eclipse]: Term=s(X,Y,Z), copy_term_vars(Y, Term, Copy). X = _79 Z = _81 Y = _60 Term = s(_79, _60, _81) Copy = s(_79, _120, _81) yes.