Fixed #2445 Fixed bug for sortAllChildren ,that tempChild is a changing Var.
Merge pull request #1058 from xingsenma/sortAllChildren

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