Improve error reporting in parse_arg_index.