Boil the cut beans in salted water for 4 minutes, shock them in ice water for 2 minutes, then drain and pat very dry.
Brown the mushrooms in the butter over medium-high heat for 9 to 11 minutes until the pan is nearly dry, then cook the onion for 3 minutes and the garlic for 30 seconds.
Stir in the flour for 1 minute, whisk in the broth in splashes, add the cream, simmer 4 to 5 minutes until the sauce coats a spoon, then season with the salt, pepper, thyme, nutmeg, and lemon juice.
Fold the beans and 1/2 cup fried onions into the buttered baking dish, pour over the sauce, and mix until coated.
Bake at 375°F for 20 minutes, until bubbling and 165°F in the center.
Top with the remaining 1 cup fried onions and bake 5 more minutes until amber, then let it sit before serving.