Avoid a few unnecessary pointer derefs in loops.