Ok, I have a work around. Outside the php script instance that you used to create the categories, you call – clean_term_cache(”,’category’);
You have to do this outside the instances where you created the categories so you dont just add the line to the end of your script. I have a form that my users use to create the categories. Once I have created the categories I then show a form with a button to clean up the hierarchy. When the user presses that button I call – clean_term_cache(”,’category’);