Pour quinoa into a pan, and toast for a couple of minutes, if desired.
Add vegetable broth. Bring to a boil, then reduce to a simmer. Add salt. Simmer 15 minutes, until liquid is absorbed. Let sit about 5 minutes to get fluffy. Set aside.
Add olive oil and chopped onions to a hot pan. Cook onions until translucent over medium heat, about 3-4 minutes.
Add minced garlic. Cook 30 seconds longer.
Add chopped celery, carrot and dried thyme. Cook until crisp tender, about 5 minutes.
In a mixing bowl, add onion, celery, and carrot mixture, cooked quinoa, ground flaxseed, and lentils. Mix and mash with a pastry blender or potato masher.
Add ketchup, salt, and pepper. Mix well.
Oil a 9 x 5 x 2 ½" loaf pan or line it with parchment paper. Pour mixture into pan and press down.
Glaze: Mix ketchup and tamari. Spread on top of lentil loaf.
Cover lentil loaf with foil. Bake at 375°F for 30 minutes* covered, then take foil off and bake for 8 minutes longer. Let sit 15 minutes so that it can firm up.
Notes
* I used a glass baking dish. If you use a metal one, you won't need to bake it as long. I would recommend checking the loaf after 20 minutes.