fix treeInstance#foldRight1
Tree Foldable1 law test
Merge pull request #541 from xuwei-k/backport526

backport #526 to 7.0.x