Remove unnecessary variables by folding calls into for loop header. NFC.