Move setting DT_RowClass and DT_RowId up a loop