Fix a race condition in SetAdditionalStackDepth

Plus some go vet changes