Partially fix the seg-fault problem.

There are two reasons: (1) the banded-matrix size is overflowed
with ``int''; (2) the matrix is singular in a way that there are
no elements in a row or in a column. This version targets at these
two points.