Preheat oven to 400°F. Dress the garlic with drizzle of oil, salt and pepper, wrap tightly in a foil pouch and roast to tender 40-45 minutes. Let garlic cool, then squeeze cloves out of their skins and mash into paste.
Meanwhile, heat a soup pot over medium heat. Add oil, 2 turns of the pan and melt in butter. Add onions and garlic, season with salt and pepper. Add bay leaf and ground thyme or thyme bundle, and cook slowly, stirring frequently, until onions are golden and very soft, about 45 minutes. Add sherry and reduce until about 2 tablespoons of liquid are left. Add stock and bring soup to a low boil; simmer 45 minutes.