torch::nn::Sequential error with Libtorch in windows

I just posted something that could be related:

It could be related because the first errors messages I got with Sequential were quite nebulous. I had to use SequentialImpl to get a decent error message and from there I could find a solution to my problem.