Minor fix on accessible groups algorithm