Lightly oil a 9 x 13-inch casserole dish. Place the beets in the bottom of the casserole dish and drizzle the olive oil over them. Sprinkle the chopped thyme, salt, red pepper flakes, and pepper over the top, and lightly toss the beets to evenly coat them with the oil and seasonings. Spread them out to evenly distribute them in the casserole dish. Bake at 400 degrees for 20 minutes, stir, and bake an additional 20 minutes. Add the cloves of garlic to the pan and bake an additional 20-30 minutes or until the beets are tender and the garlic is soft. Remove the cloves of garlic from the pan, and when cool enough to handle, peel them. Place the garlic cloves in a small bowl and mash them with a fork. Remove some of the oil that collected on the bottom of the pan, add it to the mashed garlic, and stir to form a smooth puree. Pour the mixture over the beets and toss well to combine. Transfer to a large bowl for service.