LPS-41112 Move logic up to avoid having 2 heads

Hey Brian,

We need to move the logic up because otherwise we end up having 2 versions of the same page with head = true. The reason why that's happening is because the calls to the service for revert already sets head=true for the right version, and then, after that we call the persistance.update with a page version that also has head=true so even though it was modified in the service, it's also modified in the persistance, and then we end up with 2 head=true

If we move that logic up, the service takes care of everything and we don't need to set again head=false.