- first attempt to fix z-ordered rendering. This will work in most
cases, but there are still some errors...