Unit test for #814 that works