[conversion] Fix warning by minor code restructuring.

We know that the old version of this code is safe, but the compiler
can't know that for sure. This restructuring makes it safe in
the ideas of the compiler and the programmer.