Fixed bug with least squares solver using the final singular value despite the matrix being rank deficient