Add failing test for #323
This appears to fix #323

I am very skeptical of this though
Merge branch 'issue-323'