Linux: Rework handling of names in the lookup functions