add unit test exposing an issue where the computed tree size is sometimes wrong.
fixed issue when computing trees sizes in RevTreeBuilder