Z index with flicker fix (#4170)

Part of `was_top_layer` was checking if a opaque level starts with the
current stacking order, but now that each entry in the order has an id,
those comparison checks were failing as every entry generated is now
unique

I'll admit I'm still a little fuzzy on the specific reasons for this
function to be defined as it is so I'd appreciate another set of eyes

Release Notes:

- N/A
9d221a139dJulia committed on 1/22/2024, 6:11:12 PM· committed by GitHubparents5b906e73b3252b
10 files changedLine totals unavailable