Fix determine of layout for group/team