Same exact problem as will having multiple children with the same types and values. Fixed the same way (idxt = 0, increase idxt every time you remove, and then subtract idxt from idxl to get the true index of the child you should be checking against)
Same exact problem as will having multiple children with the same types and values. Fixed the same way (idxt = 0, increase idxt every time you remove, and then subtract idxt from idxl to get the true index of the child you should be checking against)