fixes issue where tree is not added to the keycache