There's a rule that says if you start your journey from LAX, once you return to LAX your trip is over, even if you haven't used your NA segments or hit the 20-segment limit. I can't imagine that it would apply if you pass through LAX a couple of times *before* your first intercontinental leg. Also you realize that you only can have 2 stopovers in the continent of origin.