I'd love to help but I need more information. What version of Nim do you use? 0.19.9 has a known bad regression wrt `gensym` in templates that we're working on but 0.19.4 should not be affected.
- Problem with templates in multiple files cdunn2001
- Re: Problem with templates in multiple files Araq