It was observed on a quiz using multiple attempts with build on last, no adaptative (but suitable to be observed in other cases too).
As an example, imagine that on the 1st attempt, student answers question 1 2 3 leaving 4 5 6 clear. On 2nd attempt, the previous values are filled in
and the students answers question 5. Everithing gets correctly graded, values on DB are OK.
Then, without altering none of the questions, the teacher hits regrade tab, 2nd attempt only considers only question five 5 while grading,
reseting results (grade, raw_grade, ..) out of 1 2 3, but strangely the answers are still there.
Fix unchanged responses decision's code on question_process_responses() from lib/questionlib.php (backported from v1.8)