Prepare Coq Au Vin according to package directions.
In a saucepan, melt the butter.
Add the onion cook and stir until onion is tender; add the garlic. Cook and stir for an additional 2 minutes.
Add the flour, and whisk until combined. Slowly add the milk; simmer for 2 minutes. Season with salt and pepper. Whisk in the cheese, until smooth.
Pour cheese sauce into a greased 2-quart baking dish to cover the bottom. Layer with potatoes and cheese sauce; repeat. Finish with cheese sauce.
Cover and bake for 1 hour. Uncover and bake an additional 30-40 minutes or until potatoes are tender. Sprinkle with additional cheese during the last 5 minutes of baking, if desired. Sprinkle with thyme, if desired.