With a sharp heavy knife, cut the hindquarter into 2 pieces through the joint at the top of the leg. Place it in a large deep non-metal dish.
Heat a cast-iron skillet or a griddle over medium heat. Tear the chiles into flat pieces and toast them a few at a time, pressing them against the hot metal surface with a spatula until they crackle and blister. Turn to the other side and toast again. Transfer the chiles to a bowl, cover with hot water, and soak for 30 minutes. Meanwhile, toast the unpeeled garlic on the griddle until blackened outside and soft inside. Peel, discard the skins and transfer the softened cloves to a blender. Drain the soaking chiles, reserving the soaking liquid, and add them to the blender along with the vinegar. Add the cumin, black pepper, 1 teaspoon of salt, and 3/4 cup of the chile-soaking water. Blend until completely smooth, scraping down the sides as necessary. Push the paste through a medium strainer. Remove 1/2 cup of the paste, stir the sugar in, and set it aside for the final glazing. Spread the remaining chile paste over the goat, cover and refrigerate for at least 4 hours, preferably overnight.
Preheat the oven to 325 degrees. Set a roasting rack inside a large Dutch oven or heavy casserole. The rack should rise 1-inch above the base of the pan, if it does not, prop it up with upside-down ramekins or small empty cans. Pour 3 cans of water in the bottom of the pan and place the goat on the rack.
Add water to the masa harina mixture if necessary to make a soft dough. Roll tennis ball sized pieces of dough between your palms to make long ropes about 3/4-inch in diameter, then press them firmly all around the top edges of the baking dish. Set the lid in place and press it into the masa to make a firm seal. Bake the goat for 3 hours.
Break the seal by tapping the hardened masa with a cleaver or a mallet, then remove the lid and carefully lift out the goat meat, which will be very tender.
Remove the rack from the pan and spoon off the fat. Measure the broth: you will need 1 quart, so make up the level with water if necessary. Pour the broth into a small saucepan ad again skim off the fat. In a mortar and pestle or a food processor, puree the roasted tomatoes and add them to the broth. Add the oregano and simmer the mixture over medium-low heat, covered, for 20 minutes. Stir in 1/2 teaspoon of salt.
While the broth is cooking, remove the bones, excess fat, and large baking sheet and brush with the reserved chile paste. Bake at 325 degrees for 10 minutes just to set the glaze and heat the meat through. Slice the meat across the grain and place it in large shallow heated bowls. Ladle over a generous amount of the broth and scatter a little diced onion and cilantro over each bowl. Serve with wedges of lime.
To roast a tomato, heat a dry skillet or griddle over high heat. Roast the whole tomato, turning when the bottom is slightly charred, until it is golden brown with charred patches on all sides, but not burned (the flesh will be quite mushy). Leave the skin on.