Adding full support for optimistic concurrency in the update pipeline

I'll revert this. It's interesting how the functional tests passed even though the indexes were wrong.