Yeah I'm pretty sure there are tests over it. I'll open a PR with some explainatory comments if you want, if it took you a couple of goes to work out what I'm doing it'll probably be an issue again in the future.