Fixed a bug where child lengths differing threw the wrong error.