Use categories from all terms, prioritizing the last term.