A bad connection between the terminal and the wire can cause heat damage that can look like corrosion, if the screw is rusty it can also be part of the bad connection.
When I fix a connection problem in a terminal I cut back to good wire, and either splice in a pigtail, or crimp and solder a new end on depending on how far I have to go in the search for undamaged wire.
A previous repair with acid core solder can cause corrosion in wires, you need to use rosin core solder on wires.