Factorize locals targeting the same variable in a composition.