OAK-1717 wip. some logging here and there and avoided to re-link in case
the key already exists.