(lookup): Preserve errno value.