upstream rbtree bugfix(issue #530)
Merge pull request #531 from taoyuanyuan/rbtree

upstream rbtree bugfix(issue #530)