Thanks for the files Doitsu. I used kindlegen to convert the html to a dictionary using my opf file and it works. A big thank you!
A few observations:
1- There are only three index entries. 首 doesn't show in the index
2- An index search for 首 brings up nothing, but 'clicking' on the search box's 'go to' arrow take me to the correct entry for 頭.
I did a bit more testing by adding one more entry with 3 inflections and then 首 showed up but only the first two inflections of the new entry was displayed in the index list. Very strange. Looks like the last inflection of the file is never displayed. Wonder if this is a bug with kindlegen.