Fix segfault in tree_set when label is NULL