core: Remove local variables from gc.