red-black tree: use cache for latest node

Signed-off-by: Sébastien Boisvert <boisvert@anl.gov>