Fix a crash bug by GC

It fixes a GC related crash when GC is run while Table#group.