Scott's diagnosis makes sense to me. Simplest fix might be for each transform() call to allocate a new DTMManager, so the late finalizers could negotiate with the old one without any interaction with the new transformation.
Best fix might be to improve our scoping to eliminate the need for the finalizer. It's generally not a good idea to rely on finalizers anyway. "What a tangled web we weave..." "Oh, you're a programmer?"