make lookup_one_len() safe to use with directory locked shared