Fix insidious finalizer bug on compound datatypes