The last make_relative_symlink was missing the mode argument, which caused spurious linking under certain circumstances.