Fixes: https://pagure.io/koji/issue/3079
In the case where a release value is provided for an image build, this code will still go through the increment loop which is not what is expected.
Also, we should probably ensure that incr is an int.
In the interest of time, I've made some suggested updates here: https://pagure.io/fork/mikem/koji/commits/pr3080updates
Alternate PR using above branch: PR#3103
PR #3103 has been merged, so closing this one
Pull-Request has been closed by mikem
Fixes: https://pagure.io/koji/issue/3079