Add test case for #893

This is also for the newer #1028