Hi Tony,
The algorithm it uses is pretty simple. CaseComplete looks in the steps of an extension. If it sees any numbers that fall within the range of steps in the main success scenario it will assume that the last one that appears in reading order (left to right) refers to a use case step and will do renumbering on it if the referenced step changes. It's not super-complex - if you have an extension that reads "the use case returns to step 5 if there are 4 items on the order" it won't interpret that in the way you want.
Hope that helps - give me a shout if you need more info on this.
Ron