Could be the result of optimizing inventory merge exposing this problem. I would suggest use CopyOnWriteArraySet in Resource. The main downside is it is inefficient for adding lots of elements, the upside is it is memory efficient.