CORE-3882: fixed a bug that was preventing template validation from working correctly