Add indices for chunk definitions and references.