Avoid ranaway allocation
Revert broken check for matching starting characters.
Add emergancy back stop in calcDiff to main loop. We should never reach
this condition. However we must garentee this code never goes into an
infenite loop regardlless of any pontental bug or unexepected input.
BUG: 410007
FIXED-IN:1.8.2