[COOK-2501] Fix conditional in template