Preheat your oven 350°F / 180°C.
Pick over your lentils and give them a good rinse. Combine them in a medium pot with the 3 cups of water or veggie broth (I used broth). Bring to a boil, then reduce the heat and simmer with the lid ajar for 30 – 40 minutes. The goal is to slightly overcook the lentils so they become a bit mushy – the loaf will hold together better this way.
Combine flax seeds and 1/2 cup water in a small bowl and set aside to soak for at least 10 minutes.
While the lentils are cooking, combine the walnuts and sunflower seeds in a small frying pan. Set over medium heat and toast, stirring often, for about 5 minutes, until the nuts are fragrant. Set aside to cool
In a large frying pan heat 2 Tbsp of olive oil. Add the onions and sauté for about 5 minutes, until they are soft and becoming translucent. Add the garlic, celery, shredded carrot, apple, and raisins. Sauté for about 5 minutes more, then remove from heat.
In a large bowl combine the cooked lentils, flax seed gel, cooked vegetables, breadcrumbs, oats, and thyme. Season with salt and pepper to taste. Line a loaf pan with parchment paper, and firmly press the mixture firmly into the pan.
Whisk the tomato paste, apple cider vinegar, and maple syrup together to make the glaze. Brush about half of it over the top of the loaf. You can reserve the other half to brush loaf slices with, or use as a dipping sauce.
Place the loaf in the oven and bake for 40 – 50 minutes. The top should be slightly browned and crispy when it's finished.
Remove from the oven and cool for at least 10 minutes before you slice into it. But be warned, the loaf will slice more gracefully when it has cooled most of the way.