Vladimir, the issue with local task service that you could experience is when you have different instances of it used for creating the task (via LocalHTWorkItemHandler) and completing it. If they are two different instances their persistence context is not shared and thus when task is completed it sends an completed event to the engine which is received by LocalHTWorkItemHandler and it checks if the task is in state Completed - which in case of not shared persistence context it won't be and thus proceeding to abort work item instead of completing it.
So on the task service side everything is ok but engine gets outdated values so it proceeds but not in the way you expect.
HTH