Add a unit test for #311 (failing for now)