private void PopulateGroup (Group g, int first_mark_index, int n_caps)
{
int i = 1;
for (int m = marks [first_mark_index].Previous; m >= 0; m = marks [m].Previous) {
if (!marks [m].IsDefined)
continue;
Capture cap = new Capture (text, marks [m].Index, marks [m].Length);
g.Captures.SetValue (cap, n_caps - 1 - i);
++i;
}
}