Unit test for bugfix in 731b4ea