Fix gc_realloc to expand in place

* Issue #322