Eliminate duplicates from rename and link parallel ties.

This could get very expensive otherwise.
Add a line number to rectangular error messages.