Fix bug causing CMFD to report incorrect results when using threads.