The Merge-Down operator for layers was inserting existing layers first, then appending the 2 merged layers at the end (top of stack). Now merged layers are inserted at the position of the layer below the active, so the layer order remains unchanged. Note that merging a layer group has a similar issue, with the new layers getting appended at the top. This is a bit more difficult because looping only over layers drops the relative ordering of groups and layers. A separate fix is needed for that. Pull Request: https://projects.blender.org/blender/blender/pulls/130146