Fixing loadindex() bug in DocOnly