Saute the onion and the garlic in the butter. Add the mushrooms and cook for about 5 minutes. Remove the mixture from the pan and add 1 tbs of plain flour to the pan juices. Cook until lightly browned. Add the stock, lemon, juice, cream and thyme and reduce to half by boiling. Return the mushroom mixture to the sauce and add the Madeira or sherry. Heat through. Fill the ready made tart cases with the mushroom mixture and garnish with chopped parsley, a sauteed chanterelle or if feeling like a little extra luxury sliced truffle.