Red-black trees 10 - tighten up dirty logic

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>