I thought you had a bunch of logic to do all the dag manipulation in memory, and then only save it at the end. Why do you need the continue_version flag at all?