Fix task-based conditions handling
Fix a bug in task-based conditions handling machinery resulted from an invalid automatic conflict resolution. Without the fix, task-based condition handling doesn't function properly.
In addition, irrelative of the bugfix, fix the unused-variable warning showed up with !412 (merged).