I tried to use this in a template but I was wrong: multiple instances of such a template will print a series of 1, 1, 1, 1, etc., while use of the same syntax without a template will give you a series of 1, 2, 3, 4, etc. Is this intended behaviour? A bug? Or a limitation?