Heat 1/4 cup oil in a large skillet over medium heat. Add onion and cook, stirring, until soft and starting to brown, about 3 minutes. Add garlic and cook, stirring, for 1 minute. In batches, add mushrooms, stirring and allowing them to cook down a bit before adding another handful, until they've lost their opaqueness but some liquid is still in the pan. Sprinkle flour, salt and pepper over the vegetables and cook, stirring, until thickened, 1 to 2 minutes. Remove from heat and stir in sour cream, 1/4 cup Parmesan, 1/4 cup parsley and lemon juice. Transfer to the prepared baking dish.