Fix for test message referred in #1009, added corresponding unit test