He could have just revived Yahiko and lived a better life.
He can, because Madara was to be revived by Nagato in the first place, Madara is way older than Yahiko.
[meaning he can revive Yahiko easier?]
the loophole/plot no jutsu is strong on this one!