As a small addition, I think one of the things that separates the really good developers from the mediocre things is the ability to (consciously or un-) plan for things like this. (IMHO) It's important, when working on the pieces to solve a problem, to think about how they're going to be able to be (mis-)used later.
If you've got an idea of how something will be used in the future, as well as in the present, you're on your way to thinking about the bigger picture and the evolution of a (module | program | system | whatever). The best programs are those that can change over time without needing substantial rework provided that none of the base assumptions changed. And from there it's a short-ish step to making sure that the assumptions that are made are as few as possible.
I know that I try my best to make things as flexible / extensible as possible. For me, that means making as few assumptions as possible and figuring out where things are likely to change. Sure, I don't get it right all the time, but being right even 50% of the time can make an enormous amount of difference. That's 50% of the project that doesn't need to be revisited when you're ready for the next release.