This restores the symlink handling behaviour prior to 94812cca98. Fixes #9298. (cherry picked from commit 31ebc6028b)
94812cca98
31ebc6028b