Fix a duplicate wid problem.

When a file contained several documents, each contained document had the same wid.