One thing may be interesting to note: When I imported that file into a BaseX database, a few days ago, it resulted in that document being in the database twice.
The duplicate occurrence of this file could be the reason for the error message (in BaseX, fn:doc may refer to documents in a database and to documents in the local file system). How did you proceed? Does this also happen if you add the document to an empty database?