diagnose_invalid_index_path: use strbuf to avoid strcpy/strcat