In some circumstances, an assignment submission can include an invalid value of 0 for numberofsubmitters in the XML, e.g.
This can cause permission errors when the student attempts to access the submission (e.g. to view feedback).
In revisions prior to r318808, these could arise by creating a collaborative group assignment and selecting View: Assignment List by Student.
From r318808 on, these can arise by submitting a collaborative group assignment as a student (details below).
These records can be identified with:
select distinct CONTEXT from ASSIGNMENT_SUBMISSION WHERE XML LIKE '%numberofsubmitters="0"%';
As a workaround for dealing with this invalid data in submissions, the permission check should also include the submitterid (rather than relying on numberofsubmitters and submitterX values), although this is only a partial fix and the XML has to be fixed in the database for the assignment submission counts to be correct on the assignment list page.