Proper way to delete selected data rows?

I have a data source with selected rows from a table view. I would like to delete just the selected rows if they match some set of criteria.

the problem I have is that if I do something like this…

repeat with the_row in selected_rows
delete data row the_row in theDataSource
end repeat

At some point I will get an error because after I delete a row the index numbers in selected_rows no longer correlates with theDataSource.

there must be an acceptable way to do this.

there should not be a problem with changing indices when you delete the rows in reverse order:

set indices to (selected rows of theTable)
repeat with delRow from (length of indices) to 1 by -1
	delete data row (item delRow of indices) in data source of theTable
end repeat

That is just too damn clever. Thanks.