Remove repeated code.

This section of code is a duplicate of logic near the top of the
function.