Add a test for #31

The bug can be reproduced!