Add regression test for #670

Closes #670 (could not reproduce)