Lua Layers insertions on the same frame can conflict
insertBefore and insertAfter choose the index to insert at at the time of calling, but the actual insertion happens in a delayed action. That means if multiple insertions happen in the same frame, they can affect a result. E. g. an .insertBefore for the Windows layer will make the following .insertBefore calls for Windows insert before it.