Rewrote @Tinche's code example as a formal test case #6