Place stock in a saucepan and bring to a boil. Reduce to a simmer to keep hot.
Melt butter in a heavy-bottomed saucepan over medium heat. Add onions and garlic, and cook, stirring until softened, about 5 minutes. Add flour and stir to combine into a paste. Reduce heat to very low and cook 15 minutes, stirring occasionally.
Add hot stock, a cup at a time, whisking until smooth after each addition. Add thyme, bay leaf, and salt and pepper to taste. Cook over low heat until smooth and creamy, about 10 minutes.
Meanwhile, bring a small saucepan of salted water to a boil. Add carrots and celery and cook until tender, about 5 minutes. Drain well.
Add cheese to soup mixture and whisk until melted. Add celery and carrots and stir to combine. Gently whisk in half-and-half and heavy cream.
Heat through gently, but do not boil.