Fix aggressive loop optimization warning