Abstract duplicated code
Remove readlink_missing variable as it is now redundant.