Fix inclusion of file_ids in input documents