In a large bowl, add ground beef, onion flakes, Montréal Steak Spice, garlic powder and freshly ground black pepper; mix until blended.
Form the mixture into 4 equal patties, cover with plastic wrap, and transfer to the fridge for at least 2 hours.
A few hours later, take the patties out of the fridge and let them get to room temperature.
In a large skillet over medium heat, add 2 tablespoons of butter and when it starts sizzling, add onions; season with salt. Stir to coat slices with butter and cook until soft, about 7 minutes, stirring often.
Add the mushrooms and cook for 2 minutes, stirring frequently. Add another tablespoon of butter, season with black pepper and mix until the butter is melted; cook for 3 minutes.
Add pressed garlic and sauté for 1 minute. Stir in rosemary before adding Worcestershire sauce and sherry. Cook for 6 to 7 minutes, stirring often.
Taste and adjust if necessary, reduce the heat to low and keep warm until needed.
Preheat the barbecue to 500ºF.
Place the patties on the grates, close the lid and grill them for about 6 to 7 minutes per side
Three minutes before the patties are done, place the hamburger buns on the top rack and also put a couple slices of Swiss cheese per patty, close the lid and continue grilling until the buns are nicely toasted and the cheese is melted.
To assemble, scoop up a generous amount of the mushroom mixture using a slotted spoon. For the top buns, spread on mayonnaise.