Good point, I hadn't given this enough thought to be honest. I've added a unit test which currently passes. It should be easy to add more examples to cover any potential problem cases.