Merging layers deletes lower layer

I’m on version 1.13.16.1

This morning everything worked fine. But suddenly Aseprite can’t export a multi-layered file anymore in various picture formats. Found the problem: merging layers (also done in export) deletes the layer you want to merge. Here’s a gif of the problem.

EDIT: this is indexed. If I convert this in RGB and merge it, then it works.

(ALL layers have been indexed before importing into Aseprite)

Aseprite_v1.3.16.1

.