[Bug 11184] Performance regression in variable substitutions.