Relink static type objects after GC (#721).

When doing a garbage collection all not-counted references to other
type objects are nulled to prevent dangling references. Then when
counting the reachable references these links are restored, but
this was not done for static types. This patch fixes that.