Merge "Only apply the task's pending transaction if it is detached"