Add a test for bug #138