rbtree: avoid generating code twice for the cached versions (tools copy)