Redelegated the locking of the document to the documentEventCapturer in order to correct concurrency errors.