Flush the whole document manager during completeness generation
Prevented call to undefined index