Fixed a concurrency related bug that would cause unintended repetition
of the result.