Your calling the next child function after your checking the first time for vertices in an unknown child. I'm not sure what happens if you scan a meshes vertices, without first selecting a child. You may want to change this and see if you get different results.