Fix a bug with kern value indices being messed up

Indices in the entry table were off if the values were not defined in
order of appearance within the entries. That was caused by a rather
tricky handling but naive calculation of the end-of-list value markers.