Fix gro file output with index groups