WebAssembly: perform stack checks