[Issue #1170] Fix logical error in determining whether to run success or failure block for data tasks