Add tests for issue #1094.