[Regression] Fix segfault when GC is ON