Moved location of first should_save_dag variable.