foo -> S/foo S/foo -> S/foo # that's not a circular loop - there's an S in S S/S/foo -> ../lib/foo # keep the symlink because it doesn't start with "S/"