Simplified group-checking code.