Remove optimistic lock from inventory units.

Fixes #3238
Fixes #3367