TDataSheet: fixed index-out-of-bound error for small data sets