I had originally done exactly that, however I later removed it due to a couple of reasons:
1. It opens the possibility that the an old and invalid version of the token will be used later on in the code.
2. It probably wont be noticeable given that the second toString is only ever called if token is an entity, and the third is only called after the token has been modified, so a new object would need to be generated anyway.

However, I have noticed a couple of optimizations which could be used to reduce the number of toString calls and number of times the regex is performed, so I will implement these, which should solve the issue.