TST: add a test for issue #3312