Add a failing test for #312 (no time to work on for 2.5, hope to do in 2.6; non-trivial to solve)