Add regression test for bug 608
Fix bug 607: handle implicit transposition from sparse vector to dense vector