Small optimisation to tree_add_assoc