handle empty nodes in .lineage_to_cache