[3.8] Fix #1595 : Export document with its title returns a document named with its filename