Shrink dedupe code slightly