If the first `upgrade --install` results in a state FAILED, you can not
run the same command `upgrade --install` again without a failure.
This happens becuase we are search only for releases with the status DEPLOYED.
This change will if the search for DEPLOYED fails, then try to search for a release
with the state FAILED, and if found upgrade that.
This fixes issue #3353