Fix issue with task delegation

Now it is not possible to claim, start, complete or release a task that has already been delegated to other user.