Fix bug 822: outer products needed linear access, and add respective unit tests
(grafted from cfef8b0e7294a977ea03b1cc6a52cb4969f3d4f2)

--HG--
branch : 3.2
extra : source : cfef8b0e7294a977ea03b1cc6a52cb4969f3d4f2