Fix bug in concat mode where accessing loop.index will in certain
situations treat the loop.index as a string so 0 + 1 is 01 and not
just 1.
Like last commit fix a similar issue with the loop.revindex special
variable.