Fixed matrices being returned after a store with the wrong orientation (#1802)
When storing to the clang-generated temporary variable for the return value, use the matrix type from the return type, not from the return value (which is irrelevant as they are always arrays of row vectors), as to store with the proper orientation.