That being said, consider what would happen if stock prices did start to vary randomly - if you had actual research suggesting the price was too high or too low, you could trade accordingly. This would net you a profit, and also help push the price in the opposite direction, towards whatever a reasonable price is.
The larger the deviation from the "correct" price, the larger the potential profits are to be had. So if the problem ever starts to be significant (i.e. a few cents of deviation caused by index funds), this means a very large potential profit for any active funds or traders out there. And so we would expect the system to reach an equilibrium - where there are just enough active funds and traders to snatch up the profits that arise from tiny price errors and distortions caused by index funds. In effect, the index funds are paying those remaining active funds and traders a tiny "management fee" (in the form of exploitable trading behavior) to figure out the appropriate price of stocks for them!