At the moment the query orders by both z_order and way_area. Ordering by area makes sure small polygons end up on top (where there's no holes in a larger polygon). I guess z_order will help if the features are on separate layers, since there's no fine control over landcover ordering required.
But is this necessary? Are overlapping features with different z_orders - and the larger one on top - either common or wanted?
Something small under a big field comes to mind, although I'm not 100% certain what landcover would be underneath.
The most common case is probably underground parking.
Not sure what else this is relevant for?
Piers are another example, see #330.
See also #685.
Are there any other examples for which this is relevant?
Similar to the examples in #685 are subway stations in Munich:
Stachus https://www.openstreetmap.org/#map=19/48.13970/11.56587&layers=N and to the east, at the Marienplatz.
Berlin Hauptbahnhof is pretty complicated:
Here's another example: Big buildings above a large underground railway platform in Chicago:
In fact I think it's an example of #688. Neither buildings nor railway platforms are rendered by the landcover layer.
Given that we haven't seen any usecase for ordering landcover by z_order in 2 years time, I will close this. Ordering of railway platforms etc. will still be considered, but these are not landcover.
Now I look at this issue again, I see that my statement does not correspond to my action. I thought the current situation was that z_order (or layer) is not taken into account, but in fact it is. I still think it would be better not to take it into account, so the correct action, I think, would be to remove the layer column from the ORDER BY.