fix bugs in optimisation of lumi schema generation
Two bugs turned up in the optimisation step of the lumi schema generation
- when counters were randomly removed to attempt to re-pack them, the offsets of remaining counters in the same word were not recalculated
- when empty words were removed (because all of the counters inside them had been removed for re-packing) the indices of following words were not recalculated
Each of these bugs resulted in a rare chance for two counters to occupy the same bits within the lumi summary bank.
This MR fixes both bugs