Fixes #899: Issue in scalar-matrix MX operation

An alternative fix for #899

(See also #900)