Add tests for issue #528