Sorrel, with its lightly sour flavor, is a popular green in Epirus, in the northwestern corner of Greece, where this recipe is from.
Note: Here's a variation you might want to try. Giant Beans Baked with Leeks: Follow the recipe, omitting the sorrel. Cut 3 leeks, white and tender green parts, into ½-inch-thick rounds and cook with the garlic and onions.
*Note: Or, chop and sauté the sorrel in 1 tablespoon of olive oil to soften.
Put the drained beans in a pot with enough water to cover by 3 inches and bring to a boil. Reduce the heat to medium-low and simmer the beans until al dente, about 1 hour.
Meanwhile, put the sorrel in a large colander and sprinkle lightly with salt. With the palm of one hand, rub the mixture against the holes of the colander, almost in a kneading motion, so that the greens exude liquid. Do this for 10 minutes, then put a plate over the greens and a weight over the plate (such as a large can of tomatoes) and leave to drain for 1 hour.* Add to the beans in the last step.
Heat 2-3 tablespoons of the olive oil in a large frying pan over medium heat and cook the onions and garlic, stirring, until soft. Season with salt, to taste. Remove from the heat and set aside.
Preheat the oven to 350 degrees.
Drain the beans and reserve their cooking liquid. Combine the beans, drained sorrel, and onion-garlic mixture in a large casserole. Season with salt and pepper, to taste, and cayenne. Add the tomatoes and remaining olive oil and toss.
Pour enough of the reserved bean cooking liquid into the casserole to cover the beans by about ¾ inch. Cover the casserole with aluminum foil and bake for about 1 ½ hours, tossing occasionally and adding more liquid as necessary to keep the beans moist as they bake. The beans are ready when they are extremely creamy and soft in consistency, but are not disintegrating. (Depending on the age and condition of the dried beans, this could take anywhere from 1-2 ½ hours.) About 5 minutes before removing from the oven, stir in the lemon juice. Serve immediately.