Clean the mushrooms. Carefully break the stems off the caps at the base. Chop the stems finely. Heat the margarine in a frying pan and saute the mushroom stems with the garlic for 5 minutes. Turn the heat down. Add the 1/2 cup sherry or white wine, and simmer for 10 minutes. Add the bread crumbs and grated cheese (and flaked crab meat, if desired) and mix all together. The mixture should be moist enough to stick together. If it is too dry, add a little more sherry. Preheat the oven to 350 degrees F. Pack the stuffing into the caps mounding it up. Place each filled cap in a shallow pan and pour about 1/3 cup sherry or water into the pan. Cover loosely with aluminum foil and bake for 15 minutes. Then remove the foil, increase the oven heat to 375 degrees, and bake for 5 minutes to brown the tops. Serve warm.