> In worst-case, the ranges should at least > be collapsed, so that you would get a (1,5) -> (1,5) range. This is easy to do, just need to mark every merged position as collapsed. I'll do it if there's no better solution. But how did the old code actually pass this test? -- Dmitry Risenberg