improved go$getStackDepth