Fix DTLS setup (involves some test fixes as well)

Unnecessary if statement (but see note below).