Once all the meat has been browned, add the onions, thyme and bay leaves to the pan, sautéing until the onions are lightly caramelized, about 10 minutes. Deglaze the pot with the stock, scraping off any of the brown bits (fond) from the bottom of the Dutch oven. Add the browned meat back to the pan, stirring to combine. Once the pot comes to a boil, reduce the heat to low and let gently simmer for 1 1/2 hours. Stir the pot periodically. The liquid will begin to thicken as the flour combines with the stock, making a thicker stew. Once the meat is tender, add the leeks, carrots, garlic, potatoes and stout, stirring to combine, and cook for another 35–45 minutes. Check the seasoning, and adjust salt and pepper if needed. Once the vegetables are tender and the meat has that melt-in-your-mouth consistency, the stew is done.