Well I played a bit with your example, and I have to say, I can't obviously see
what is wrong. Since the items thing works and the error comes from the
compiler of the generated code, I recommend you to actually look at the
different versions of the generated c++ code between items and mitems and see
what is wrong there, and if you can fix it. It it is something you do not have
control over, it is worth creating an issue with your example. Just one last
hint, when you actually take a look into the generated c++ code, I recommend
you to disable debugging and enable optimizations from the nim side, it makes
the generated code much more clear.