Ah okay I see what's happened here. varstrings aren't intended to be as sophisticated as this: they only substitute a single named variable, not an arbitrary lua expression, so you can't use inline function calls in this context (currently).
As a quick workaround, you can do something like
local orbs = table.concat(prog.orbs, ", ") text "magical orbs: $(orbs)"