We are having the same problem, but only in one of our
applications. It has a particularly large structure that loses
integrity randomly, much as you describe. It is only marginally
predictable where the problem will occur. We can't reproduce the
problem, and have instead installed an error handler that traps the
problem, and allows the visitor to reset the state.
Removing the Duplicate function reduced, but did not
eliminate the problem.