Fix branch index problem. Calculate coverage stats from Java objects rather than JSON.