flattenbed merges regions that are grouped by a certain column