Fix invalid iterator in SurfaceInterfacePrivate::raiseChild()
The append method will invalidate the iterator, so we cannot call the erase() method with the old iterator.
The append method will invalidate the iterator, so we cannot call the erase() method with the old iterator.