Melt the butter in a large pot over medium heat. Add the onion and cook until the onion is softened and translucent,a bout 5-6 minutes. Stir in the flour and cook, stirring constantly, for about a minute. Combine the chicken broth and milk in a liquid measure and slowly whisk in the mixture. Add the salt, pepper and thyme. Stir to combine. Bring the mixture to a boil and then reduce the heat to medium-low and simmer, stirring frequently, until the mixture is slightly thickened, about 5 minutes.

Take the pot off the heat and stir in the cheese until smooth. Mix in the frozen hash browns, lifting and folding the mixture until well combined. Finally, stir in the sour cream.

In a medium bowl, toss the lightly crushed cornflakes with the butter until evenly combined. Scoop out the potato mixture into a 9X13-inch baking dish and top with the buttered cornflakes. If baking the potatoes by themselves, bake at 350 degrees for 45 minutes, until hot and bubbly around the edges. If baking the potatoes with a ham (my ham recipe bakes at 300 degrees), bake the potatoes for 90 minutes at 300 degrees then crank the oven to 400 degrees and bake the potatoes for 10 minutes more. In both baking situations, let the potatoes rest for 10 minutes before serving.