Bugfixes from dense linear algebra refactor.