Using a new UID for multiple substitutions.

On some cases, such as with Gammas, we need two or more substitutions
so it's better to use a new UID for a new gamma to which all values are
replaced. Otherwise we get infinite substitutions later on.