How to use counter inside a generated table

If you call ctype.step() inside the returned list/content, the counter will work. I don’t know why this is necessary though, seems to be some technical detail/issue with counters/contexts inside a map?

// replace the lines inside ..activities.map(it => {}) with the following lines
let ctype = ctypes.at(it.type)
return (
  [#ctype.step() #it.type#context ctype.display()],
  it.description,
)