Pulse the coriander seeds and peppercorns in a food processor
for about 1 minute or until coarsely ground. Add the shallots,
garlic, salt, and brown sugar. Pulse to make a thick paste.
Transfer to a mixing bowl, add the beef, and let it cure for
at least 1 hour, turning occasionally.

Meanwhile, heat the olive oil in a large sauté pan
until slightly smoking. Add the onions and sauté over
high heat, stirring occasionally, until dark brown, about
12 minutes. Add the barbecue sauce and stock to deglaze the
pan. Bring the mixture to a boil and reduce until syrupy.
Remove from the heat and let the onion marmalade cool to room
temperature.

Combine half the marmalade with the tamale dough in a mixing
bowl and mix well with a large spoon.

Drain the cornhusks and shake dry. Tear 16 strips (about
1/8 wide) from 2 of the husks and set aside for tying the
tamales. Lay out the remaining 8 husks and divide the dough
into 8 even portions. Place one portion on each husk, and
evenly spread the portions out, leaving about 1 ½ inches
of exposed corn husk at each end and ¾ inch at each
side. Roll up the tamales so that the dough is completely
enclosed inside the husk. Twist each end and tie with the
strips.

Preheat the oven to 400 degrees Fahrenheit.

Fill the bottom of a steamer or saucepan fitted with a strainer
or vegetable basket with 2 to 3 inches of water. Bring the
water to a boil and place the tamales in the steamer. Cover
tightly with a lid or foil, making sure very little if any
steam escapes during cooking. Steam the tamales for about
30 minutes over lightly boiling water until firm, adding more
boiling water if needed. Let rest for at least 5 minutes before
serving.

Meanwhile heat the remaining 1 tablespoon olive oil in a
large sauté pan over high heat until slightly smoking.
Add the tenderloins and sear on all sides. Transfer to a roasting
pan and cook in the oven for about 8 minutes for medium rare.
Remove from the oven and allow the beef to rest for 5 to 10
minutes, then cut into ½ inch slices.

To serve, slice open the tops of the wrappers from end to
end. Gently push the ends together, as for a baked potato.
Lean the sliced beef against the tamales and serve the remaining
onion marmalade on the side.