uploadArchives is skipped as task onlyIf is false; why?

The full build is here:

What really confused me was that I was looking for an onlyIf predicate and there was none. I then realized uploadArchives has a dependsOn element in the build where the dependent-upon task attempts to enable/disable the uploadArchives. Removing that piece of code made it work.

The error message should definitely be clearer.