anchor.diff:  
     cd.appendTrafficLight = (event) => {
       const colour = event.colour;
  -    // Version 0 events did not store their index
  -    event.index = event.index || wasIndex() + 1;
  +    const index = event.index;
       if (colour) {
         const $div = $('<div>', {
           'class':'diff-traffic-light',
           'data-id':id,
  -        'data-index':event.index,
  +        'data-index':index,
           'data-avatar-index':avatarIndex,
           'data-colour':colour
         });
  
positive.code:   //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  
    const events = <%= raw @events_json.gsub("\n",'') %>;
    events.forEach((event) => cd.appendTrafficLight(event));
  
  });
  //--></script>
  
  <!-- The index of most-recent (rightmost) traffic-light -->
  <!-- event is updated in the browser and sent back to the -->
  <!-- web service as an optimization (so the web service -->
  <!-- does not need to retrieve it from saver). -->
  
  <input type="hidden" name="index" value="0">
  
  
negative.code:       });
        const $light = $div.append($img);
        $lights.append($light);
        $light.click(() => cd.setReviewData(version, id, groupId, avatarName, avatarIndex, index-1, index));
        cd.setupTrafficLightTip($light, version, id, avatarIndex, index-1, index);
        updateCounts(event);
      }
      wasIndex(index);
    };
  
    const isRag = (s) => ['red','amber','green'].includes(s);
  