proxy: fix validation of the proxytype value
Coverity says it could be an out of bounds read, but the value is set internally, so not really. Still, good point about the condition being wrong.