4fc94ecd55b5eaad3d931593e0f6abf046ee6471 says nothing about merge conflicts in UnitOfWork - or did the conflict happen earlier?

@dantleech can you merge master into this branch again and then compare those places that are still strange with the code in master?