Fix GC crash with gob/parent handling

This fixes CureCode issue #1969
Merge pull request #100 from ladislav/bug#1969

Fix GC crash with gob/parent handling