The issue can be often be solved in advance by simply not accepting the first answer right away. Instead the questioner should wait at least a couple of hours if not a day until the answer is accepted. This way other people have a chance to give an answer as well.
Another thing is when a new answer is given after a longer period of time. It happens that month or year old questions receive new answers. This is of course ok. This site is all about collecting knownledge and presenting it in a useful way. Here you should feel free to switch the acception mark to another answer if you feel it's the better solution.
However, there are cases, IMHO, when switching the accepted answer is not considered correct: For once, if the questioner gives a final self-answer with its solution based on another answer, switching the acception should not be considered OK.
Also if the new answer copies 99% of the new material and simply adds some marginal content for example. Here it might anyway be better the additions are added as a comment to or are edited into the existing answer.
Now if the new material is substantial to the problem and provides a significant better solution it should be considered to be accepted, because on the long term it will be more useful to the OP and other users in the future.
It should be noted that it's common practice and considered as good tone on this site to refer to the earlier answer when posting an improved version.