Fix crash in dump() when index is a table