[FIX] Error when installing module document

Fixes #2005.