Revert "Fixes: #2703 the check on template for uid unicity is wrong"

This reverts commit 8d20df75b08c80901b3fc6c3a7de25e9202ea27c.