Remove redundant variable sets.