There are some people who argue that all interactions involve a net benefit to the individual. Applied to this case, who's to say that Carton didn't consider giving his life as the greatest gain for himself? That the blissful moments walking to the guillotine weren't for him the nirvana he had searched for all his life? That he didn't reach maximum benefit for himself and for those he loved?
It seems to me, however, that there is a transition from a direct value interaction, the straightforward Randian human interaction, to one of expected value, a switch from certain value to one of probability with a time lag. This would properly fall in the range of cooperation or reciprocal altruism. There is a further transition from cooperation to altruism where there is no value inherent in the interaction because there is no expectation of return. One example of this is raising children. Carton also falls into this group. Thus, those who argue that this is still self-interest do so on the basis that the perceived benefit in such a transaction is an affective or psychological gain. This may or may not be valid, it is still a non-value transaction and isn't governed by the marketplace.
In other words, what if one innocent person chose to die so that 1,000+ others could have a chance to live- Would that person have made a moral or immoral decision?
Assume that other person had a 'good life'. IE- they were not a useless drunk like Carnton in the story.