Actually, I was apparently wrong about MatrixSymbol. It requires two indices, so it doesn't suffer from this issue. `list(MatrixSymbol('A', n, m))` gives `[]`. So you can remove this part.