Fix bug in computation of matrix with modified diagonal.