URLSpan fix for foreign context