fix double free bug

Addresses #340.
I merged this already, but there should be a (void) in front of this, to make clear that we intend to not use the pointer we get here as a return value, and maybe add a comment for why? Like you explained in the discussion of the issue?
```c
*gn = gt_genome_node_ref(*gn);
```
would be fine, too I think