I think I ran into this problem myself, the issue is that when the row is deleted by jqGrid it is (quite rightly) removed from the list of selected rows.
If when you loop over the rows to delete you are just looping over the list of selected rows then this array is changed on the fly by the delete function so it doesn't work quite as you might expect.
The workaround is to copy the array of selected rows using .slice() – or you could always try and delete the first entry in the array of selected rows.