layoutsTree is only publicizing the friendly URL of the layouts, which is "testpage" in our reproduction steps. This is not enough to create a fully functional URL.
Add a new attribute, <fullURL> to the JSONObject, which has the fully functional URL and use that in the layout tree template.
Reproduction on 7.0.x:
1. Log in as admin.
2. Create a new blank site ("testsite").
3. Add a Private page ("testpage").
4. In the created site, add a new web content ("testcontent").
5. Type in any word in the body of the editor, then click that word.
6. Click the Link button, then the Folder icon.
7. Go to Private Layout tab and select the previously created private page (testpage), then save and publish the content
8. Add a new Private page ("publishing") and add a WCD portlet on it, then display the content in that portlet
9. Click the link in the displayed content
7.0.x - reproduced
master - layoutsTree isn't used in this case, but the code is wrong, just as on 7.0.x.