Correct fencepost error in diagind. Fix #7181