CPack: Do not recurse through directory symlinks

Extend the fix from commit 7b8dcdd1 (CPack: Do not recurse through
directory symlinks (#12284), 2011-08-27, v2.8.6~55^2) to more places in
CPack.

Issue: #12284
24 jobs for cpack-symlinks