Hi, I remember I ran in similar problem and couldn't figure out what was happening..
Maybe our PRO users and developers will find the reason.
On the other hand if submatrix is not going to work properly, you could use the "range" syntax to extract the desired submatrix elements. This "ranged" syntax asks more or less the same kind of parameters, and it will work.
I suggest to take a look at remarkable mkraska handbook: there are some other examples that show how to handle matrix and submatrix just playing with ranges and vectors in the matrix indexes.
See screenshot of his submatrix help page, so that you don't need to dig into the handbook right now.

With this different approach, your sm file is going to work properly
rootsfunction-2.sm (7 KiB) downloaded 30 time(s).Now something which maybe will be a hint for developers (hopefully).
I wanted to see what the result of submatrix looked like in a different way, so I tried to convert it to a system.
I'm getting a quite unexpected result indeed.
If i convert my var.3 with same approach, I obtain a regular "clean" system.
Hope this does help

Bye