Fix: xml: Prevent use-after-free, version may be free'd as part of applying the v1 patchset
Fix: xml: Prevent use-after-free when calculating v1 patchsets