TST: sparse: add regression test for gh-3087