Rewrite after the third update
For sure, yea and most definitely so after the third bugfix!
The third time you update a piece of code with a new feature or new functionality, take a look at the module, and see whether it can be re-written better, differently, simpler, with more documentation, etc. Odds are that it can. Odds are that the time you take to do the rewrite will be more than paid off the next time you edit this code.
Mind you, if you've been updating the code due to bug-fixes, there is something profoundly wrong with what you are doing, so take a long hard look at not just the module but everything else. Is there a logical/semantic issue here? Is the code being rushed into production? Are the requirements bad? Do you need help? (and so on, and so forth...)