Add failing unit test for #5

Adds a unit test which exposes the problem outlined in #5