I think, as of "First Contact", when Lily confronts him about the hypocrisy of all his speeches on "evolved sensibility", he finally gets off for good
the stupid high-horse so many "intellectuals" have...and face the facts. It took a while for him to reach that point, but by then, he has understood that sometimes, going by "values" and "principles" are just going to get us all killed.
It's the same lesson Sisko begrudgingly learns in "In The Pale Moonlight"--and which Bashir is dragged, kicking and screaming, into accepting in "Inter Arna..." and "Extreme Measures".
"The saying implies but does not name the effective agency of its supposed utopia.... 'Needs and abilities' are, of course, subjective. So the operative statement may be reduced to 'the State shall take, the State shall give'."