attempt to merge MatrixVar into existing scalar variables