Sort inserted children before going through them