When parent is set to NULL, categories should clean up ancestors array