Add new test case: GC does not break tree semantics