Change dynamic scoring to count the max score for every task taken towards the max score for the branching scenario and sum the obtained scores towards the total score achieved for the entire branching scenario. If the same task is taken multiple times, replace the max score and obtained score for that task every time so that only the latest max score and score counts toward the total score and max score. (remember that some task can have different max scores per attempt)
Todays functionality is strange and doesn't work at all if the student is allowed to go back and forth. Students have achieved scores significantly higher than the max score.
Today's solution assumes that the best path the students can take is the one that has the most obtainable points and that each task has a known max score. None of these assumptions are correct.
The drawback with the new solution is that the max score may wary for each attempt.