The following layout leads to elements not being correctly rendered when animations are enabled: graphics element (z-index=150) on top of a video element (z-index=100) which is on top of another graphics element (z-index=50).
If animations are disabled on the farthest away element (z-index=50), everything renders as expected.
If animations are enabled on the farthest away element (z-index=50), the top-most element (z-index=150) is rendered below the video element instead of on top.
This can be reproduced using attached test.html
This happens with wpe-2.46, but not with 2.38.
Also tested without the changes for #1618, but the issue remains, so seams unrelated with those changes.
Expected:

Actual
