Properly resolve links when doing getkeys