I don't understand this part. Is this related with this patch or is this a bugfix unrelated with this patch?

(also, instead of parsing elements for every `name` in `names`, we can parse them one time then add names to `ret` using that parsed values)