C'mon,realy?!!! why do you think Madara took Obito under his wing? Let me answer that for you..and another thing... nagato didnt know abt the real madara, tobi introduced himself as madara cause when itachi and nagato were brought back using edo tensi they still addressed tobi as madara.. and thus i think that pein didnt know that he had to ressurect madara
"To ensure that Nagato ressurects him." OMG