lstat_cache(): introduce has_symlink_or_noent_leading_path() function