Remove infinite loop in region allocation