Mark unnamed hook args as unnamed

When no name for the argument can be extracted, `$(unnamed)` is used.
Also only use the value name when it is a string, otherwise we’ll catch
constant names.
Don't overwrite hook args with duplicate names