Added test to ensure group flattening works