A common problem with z-index is the misuse of this by advertising. This creates bugs when developing navigation, modals, panels etc especially as 3rd party scripts are often turned off for development.
I propose a z-layer property to name-space z-index values and help prevent ever increasing indexes. An accompanying property might be
z-layers: key value where the key is the
z-layer-name and the value is the accompanying
The point being, that an element set within a z-layer-index of 1 can be higher than an element within a z-layer-index of 2 (no matter the z-index). Giving names to these layers allows 3rd parties to set there content appropriately and the the developer to place that layer where it is needed within the app.