Fixed #2445 Fixed bug for sortAllChildren ,that tempChild is a changing Var

 Fixed #2445 Fixed bug for sortAllChildren ,that tempChild is a changing Var