Check for unpublished/archived categories when flag is set

Only check for bad categories when the publishing state