Sounds like a classic race condition to me. If you are testing with the same value sets over and over you might be getting a collision from concurrent workflow runs, a cache needs some time to sync, or the database is still doing some work. If sleeps are not working you might try using locking so that only one instance of the workflow is running that is attempting to manipulate elements for a given path.
Paul