Correct and tweak visit_leaf protocol.