In a large Dutch oven, melt butter over medium heat. Add sugar and onions, in batches if necessary. Cook, stirring often, for 1 hour or until golden brown. Add garlic, and cook for 2 minutes. Stir in flour, and cook for 2 minutes. Add beef broth, beef consommé, salt, and pepper; bring to a boil. Reduce heat to medium-low, and simmer for 30 minutes. Add thyme, and simmer for 5 minutes. Ladle soup into ovenproof bowls; top with toasted baguette rounds and shredded cheese. Broil 6 inches from heat for 3 minutes or until cheese is browned and bubbly. Garnish with chopped fresh parsley, if desired. Serve immediately.