Fixed a bug in create_temp_sparse_matrix_table_with_dims