helpers: fix tables with indices starting with 1

... heretics ...
writer: fix tables with indices starting with 0