Fix the tree method so the "update" call doesn't clobber existing key entries.