wml: Preemptive bugfix.

get_subtag was being called with the apparent assumption that it would
return the `n`-th subtag of the tag, irrespective of `i`, whereas in
actuality it returns the `n`-th subtag after the `i`-th subtag.

Also, optimization: elide a temporary table construction.