private TMLContext traceRemoteDocument(TMLContext context, String linkTargetContentKey) throws WGAPIException {
try {
String remoteInfo = context.content().getItemText("remote_info");
RemoteDocReference ref = new RemoteDocReference(remoteInfo);
WGDatabase targetDB = context.content().getDatabase();
WGDatabase sourceDB = (WGDatabase) context.getwgacore().getContentdbs().get(ref.getDbKey());
// Determine the language behaviour to use while resolving the link in source DB. If both dbs are multi-language we can
// use the target language behaviour to allow behaviour integrity. Otherwise we must choose source behaviour.
WGDatabase langBehaviourDB;
if (LanguageBehaviourTools.isMultiLanguageDB(sourceDB) && LanguageBehaviourTools.isMultiLanguageDB(targetDB)) {