Allow %name to take an infix name as an argument.

Fixes #1191.