[LMB] Restructure allocation loops to avoid unsigned underflow