symlinkJoin needs better handling of folder symlinks

Is there a way to improve symlinkJoin and then remove this warning?

https://github.com/DavHau/mach-nix/issues/162

It occurs to me to detect a symlink that also is a folder and then traverse and manually de-reference it here in a sub folder.

A good idea? → Maybe it would suffice to only check first level where name clashes are almost certain (./bin / ./share / ./include / etc).?