Fixes math to treat only ordered collections as math.js matrices