Improve GC support for hashset