When the layer of a CanvasLayer changes, the order of roots needs to be recalculated.
(cherry picked from commit 8d60e8b5d4)
When the layer of a CanvasLayer changes, the order of roots needs to be recalculated.
(cherry picked from commit 8d60e8b5d4)