Template level deduping

Simple template deduping. If an ID has been used *somewhere*, don't use it.

@ironsidevsquincy