Improving the 'IDisposable' implementation for 'TextScanner'