lstat_cache(): more cache effective symlink/directory detection