Could it be caused by a slight mismatch between: acs-content-repository Content Repository 5.3.2 file-storage File Storage 5.3.1
I went back and read through this.
So what is happening is that the content is stored in the lobs table.
Each revision, if the content (the file) is the same, will refer to the same row in the lobs table.
The function is attempting to delete the row from the lobs table, although there are still revisions referencing that row.