Worked out what I believe to be the last of the remaining bugs related to child states