Calling the cosmos msg / query API from wasmx contracts effectively creates another subcall with its own context, that can also create another wasmx execution/query inside.
Right now we use (level, index) pair to keep track of wasmx subcalls, for handling vmsql and vmkv host extensions and rollbacks.
We should eventually remove access to cosmos msg/query for wasmx, because we should fully replace cosmos with contracts.