Remove redundant assignments.