Closes https://github.com/ppy/osu/issues/25827.
The logic cannot be easily abstracted out (because
`CompareReverseChildID()` is protected and non-static on
`CompositeDrawable`), so a local copy was applied instead.
No testing as any testing would have been purely visual anyways.