handle non-idempotent __gc in finalizer