The two problems you report are completely different from each other.
The first report is really a wrong API use. The call did not fulfill the constraints that were already given in
the javadoc, i.e. that the provided tree MUST have proper Boolean attributes at leaf nodes. There is no
verification here for performance reasons (it would imply walking the full trees all the time). I really don't
think it would be a good idea to do such verifications. So I only improved the javadoc of the constructor
to make it more clear this constructor is for expert use only (building a tree is difficult) and that there is
no verifications, adding in the documentation that failing to provide appropriate arguments is the
responsibility of users.
In fact, general users should never use this specific constructor, but should rely on the other ones which
are there precisely to avoid this kind of errors : the other constructors ensure the tree is correct before
calling this constructor.
The second one is a real problem, I have fixed it (see r1590251).
Please reopen the issue if you do not agree with the fix for the first problem, as it is documentation only.