ldeployer: cleaning up stack scoping