Fix compute of initial leafs in sum_tree

Initial leafs are works that are not parent.

review2931002
(transplanted from 366f5a6e5cc8dfb1a66ff6384dc74df4982cbd34)

--HG--
extra : transplant_source : 6oZn%5C%C8%DF%B1%A6o%F68M%C7M%F4%98%2C%BD4