edit.py was really broken - one symptom, deleting the wrong line in presence of duplicates