Update variables used in substitution.