Fixed garbage collection of symlinks. #786