Hello, I would like to share my opinion on this topic as well
#1. Kishi didn't make error with Rinne Tensei

, I will explain mechanics of Rinne Tensei jutsu's mechanics as I see it.
Assumptions:
1. To use full potential of Rinnengan, you have to have Senjuu and Uchiha DNA in one body.(Madara, Obito)
2. These who does'nt have Senjuu and Uchiha DNA in one body can't use full potential of Rinnengan (Nagato)
========================================================================================
Let's assume:
1. Each day passed from your death is equal to 1 point of chakra.
2. Number points of chakra is equal to number of dead people who you ressurect with Rinne Tensei with one day passed from their death.
3. Each person with one day passed from their death equal is 1 chakra point.
========================================================================================
Formuła of Rinne Tensei: RT= T*N
RT- Rinne Tensei
T- Time passed from death(1 point of chakra=1 day)
N- number of dead people
========================================================================================
Let's Analyze then situation of Nagato
For example Full power Nagato has 300 points of chakra. After using his chakra in fight against Konoha, then Sage mode Naruto, Kyuubi possesed Naruto Nagato was left with around 25 points of chakra.
Now if from everyone's deaths who died, in Konoha passed below than one day.(Let's assume it was 6 hours) ,(6 hours of 24 hours=1 day).
1/4*100=600/24=25
Result is 25 points of chakra costed Nagato to ressurect 100 konoha shinobi with six hours passed from their death.
But because Nagato has 25 chakra points, he died.
========================================================================================
Now let's discuss about Revival of Madara
Let's say Current full power Obito has 200 chakra points, but thanks to Senjuu DNA and Uchiha DNA in one body.
Each dead person with one week passed from their death cost - 1 chakra point. Remember Uchiha clan has powerfull spiritual energy so maybe one point of their chakra is equal to 7 points of normal ninja's chakra .
If from Madara's death passed 20 years., then RT = 1*4*14*20*1= 1120 chakra points
Conclusion: Obito doesn't have enough chakra to Revive Madara...
Madara may have 400 chakra points, but it could be still not enough.
Gyuuki(Hachibi) coul have 400 chakra points at full power, so with Killer Bee(100 chakra points), 400+100=500 chakra points
Let's assume Kurama has 800 chakra points at full power, and current Naruto in Bijuu mode has 600 chakra points(400 half of kurama's + 200 Naruto's), so it still could be not enough to work.
600<1120
Naruto Bijuu mode max potential power has potential to get (800+200 =1000 chakra points), still could be not enough
1000<1120
That's when Juubi come handy
Juubi first form - 800 chakra point
Juubi second form - 1200 chakra points
Juubi last form - infinite chakra points
Obito connected to Juubi could ressurect Madara and probably lives on, but maybe one of mechanic of Rinne Tensei is that you have to have more than enough amount chakra to survive without dying. In other words, Obito could ressurect Madara with external source of chakra(Juubi) but his own ammount of chakra couldn't be enough so he would die after process.
Obito + Juubi second form= 1400 points
Remember that Madara's revival could cost 1120 chakra points to work, so Obito with Juubi second form will have more than enough
1400>1120 (Madara ressurection will work) 200<1120(user of Rinne Tensi will die after process)
========================================================================================
Summary: Number of dead people you want to revive and time passed from death depend on your amount chakra, making revival possible when it is enough and impossible when it is not enough
I hope you get what I tried to explain

I know I used many assumptions, but I tried my best to explain my theory about working of Rinne Tensei.
Nevertheles it could go agree with:
1. Konan's statment in manga about Nagato's amount of chakra not be enough to ressurect them and live on.
2. Nagato's statment that there is still time to ressurect people in Konoha.
3. Madara statment that he could be ressurected with Rinne Tensei.
Do you agree with my theory or not ?
=======================================================================
EDIT:
-
Sage of six paths in his prime before Juubi could have 800 chakra points
- Obito or Madara as Jyuubi perfect form jinchurki could ressurect even Sage of six paths(due to Juubi's infinite amount of chakra )
- About Yahiko, it could be tha Nagato wanted to follow his own way to reach peace, or due to Six paths of pain, he modified body of Yahiko, so he couldn't ressurect him even if he has enough amount of chakra.
Let's imagine Sage of six paths COAT + Rinne Tensei= Total ressurection of any number of people
Creation of all things(create you new body), Rinne Tensei(ressurect you to your new body created by COAT)