Update visited matrix when cell is deleted.