Fixing wrong implementation of checking if task already exists, which broke Test-TargetResource and cause Set-TargetResource to misbehave