Race condition: an abort after the last test case is ran does not reset terminate grading. Rather, it aborts the next submission, which, thankfully, does reset the flag.