Fix matrix * and \ for errors reported in #5953