Known Orochimaru was the one that recognized Nagato, the key to Madara's plan, needed to be killed long before the fox attack, remember him telling Tsunade and Jiraiya. Also means he didnt know Madara's resurrection plan at that time, but might be the time period he met Madara.