Closes #38: Corrected logic for determining parent status of category