Could do with even more tests here. Feels like there are lots of variants, and this has previously had poor test coverage.