Added test for gc and SavedStacks integration