dedupe lists for templates