Fix context links when there are spans present in region. Fixes bug 9377...

...10