remove side-effects in template helper

From http://stackoverflow.com/a/25136092/156060 ... "The general rule is
that templates and template helpers should not have side-effects (like
setting Session variables)."

See also: http://stackoverflow.com/a/25136092/156060 , which describes a
way to add item indices to a Spacebars {{#each}} loop.