Fixed bug dealing with constant field size in Variable class.
Added test for matrix vars.