The actual substitution isn't important in the original post; the fact is that using braces to enclose the substitution part leads to some behaviour that's not what I expected.
As you may see in the OP, I already found a solution/workaround to get what I wanted (i.e. using square brackets instead of braces); what I'm asking here is if this behaviour is buggy or not.