Preheat your oven to 350°F (175°C)
Line a loaf pan with baking paper and set it aside.
Finely chop garlic cloves, onion and carrot.
Sauté garlic in a heated pan with olive oil until fragrant. Then add the onion and carrot and sauté for 4-5 minutes or until the onion is translucent.
Chop scallions and add them to the other vegetables. Cook for two more minutes.
Place the cooked vegetables in a large bowl and add 2 cups of lentils (leaving ½ cup apart for later). Using a hand blender, process the vegetables and lentils until you have a thick paste. Then add walnut pieces and blend again. This can be done with a food processor as well.
Add all the spices, the rest of the lentils, breadcrumbs, flaxseed egg, olive oil, balsamic vinegar, soy sauce and salt and stir to combine.
Transfer the mixture to the prepared loaf pan, pressing with a spoon to get a compact loaf.
For the glaze, whisk all the ingredients together and then spread it with a spoon over the top of the loaf.
Bake for 40 minutes, or until the edges start to turn golden.