Dear Ben,
Please test your code several times, do you have this issue every time or intermittent? I tested it serveral times on my end, I cannot reproduce it.
The FileGuid of every uploaded file has different value, it should not throw this duplicated key error. Can you check the column of "FileGuid"? Is there duplicate value?
You can do the following:
1. Go to your database and table
2. Expand the table "UploaderFiles" and you will find Index
3. Script out the index by right clicking on script index option
4. Delete the index
Please test it again, keep us posted.
Thank you for asking