Regression in 0.7.4.rc1

Fixes the regression from github issue #2452.
Merge pull request #2654 from jrioux/matrices

Regression in 0.7.4.rc1