Could use documentation, it's good to explain what's going on with tricky situations like this for those who come across this in future.