Fix inline asm labels in template functions.

This is a giant kludge to avoid a redesign of the inline asm
handling code. I'd be glad if somebody came up with a better
solution.

GitHub: Fixes #340.