Recall that the virtues are applications of rationality to narrower contexts; they are aspects of what rationality demands, and we separate them for ease of focus and study. The overarching virtue is rationality.
Both of your examples are of people whose basic mistake is belief in God, which means accepting the arbitrary on faith, which fundamentally undermines a person’s basic means of living. This, most definitely, is a vice, and its consequences could have ramifications in any area of one’s life, and thus on one’s ability to practice any virtue. Recall also that the virtues are distinguished by the area of reality on which they focus our attention. Although Aquinas and Valjean both lack integrity insofar as they fail to consistently act on rational principles, their basic error (and thus vice) is more fundamental; it’s that, in a crucial area of their lives, they act not on their own rational judgment but on faith in their feelings and the say-so of other people. That is, both fail to practice the virtue of independence. Because they don’t, they don’t adopt rational principles by which to act with integrity.