Thank you. it solved the problem.
Though I wonder why it still works in my personal wiki also running 5.1.19. I
guess some plugin is blocking something... properly not good in the long
run.
I must say, this is not an elegant solution if this is the new way of using TOC. it makes the TOC macro a lot more cumbersome and difficult to remember. maybe it will be easier to just use lists.