Fix duplicate removal. Was completely broken, with a "job_id IS NULL" condition in...