In theory, you're right. In practical, day-to-day programming, an IDE can get it right the vast majority of times and do exactly the right thing. See a previous post of mine: http://news.ycombinator.com/item?id=4037602
I believe that "works almost every time" is great, but that last inch is also meaningful. Knowing you can trust your IDE's refactorings is reassuring and allows you to dare do things you might otherwise not dare.
Or with. With dynamic typing and dynamic name resolution such as in Python, there's no way to know with certainty, even if you run it.