This patch fixes the following problem:
- open a file with references to the symbol Foo
- remove all references to Foo (from the dynamic index).
- MergedIndex::refs() result will contain positions of removed references (from the static index).
The idea of this patch is to keep a set of files which were used during index build inside the index.
Thus at processing the static index references we can check if the file of processing reference is a part of the dynamic index or not.
Maybe to be really explicit, add the lifetime constraint: "The function must only be called while the index is alive."