TEIID-2988: Fixing the  for zero based index