I am not able to replicate an issue with the Image/Document selector using Sitefinity SP4.
When you insert a link from a gallery/sitemap it has the format shown below below
<img alt="" width="1168" height="951" src="/EmptyProject/Libraries/test/wf1.sflb.ashx" sfref="[Libraries]c61f5a71-312b-4552-824b-c6a9b74f03a6" />
So there is a special attribute sfref which we use to keep a relation to the content /page ID, but we also add src attribute to resolve the image url.
the Telerik team