Fixed resetting of fileid sequence for compacted files.