Comments from other people suggest that it happens when the element has been deleted since the report ran. I will add checks for this so that it doesn't give errors (or make edits) in such cases in future.