The patch also fixes a bug in the optimizer algorithm, where the line
segment of the first non-converged point, i.e. "lastIndex" is wrong.
This particular fix is also applied to GDAConfiguration::
calculateStateProbabilitiesGPU(), which uses the same algorithm.