Steps to reproduce:
1. Create blank site, add a single blank page
2. Add documents and media gallery
3. Add an image to the documents and media gallery
4. Add a web content article to the page, and using WYSIWYG editor, choose the image from above for the content of the article. Click publish.
5. Observe article shows image correctly.
6. Enable staging
7. Go to staging site, observe image looks correct, move a few portlets around, and publish to live
8. Observe the image is now broken on the live site, and in its place a bad link like /web/test1/[$dl-reference=/group/26024/com.liferay.portal.kernel.repository.model.FileEntry/26037.xml$]