Fix group computation trace loop bug