Minimize the scope of some variables, NFC.