Add a test for issue412