Little-known — and therefore little-hated! — this bug applies only to Marketo’s email-specific Velocity setup, and not to the language in general.
If you mentioned it to someone who’s built webpages (as opposed to emails) using VTL, they’d rightly look at you like you’re crazy. And the necessary workaround also goes against every coding principle I’ve ever endorsed.
In other words, please don’t take any general-purpose Velocity guidance from this post, but do use the code for this specific goal.
Even when you follow the prescription for generating tracked links in Velocity (namely, output fully-formed <a> tags from VTL, as opposed to outputting bare URLs and trying to plug them into <a>s in the outer email content) you still won’t be able to output multiple tracked links in some common cases.