Variable.expand: Return number indicating number of expansions.
StringTemplateTest: Simplify code.