Remove duplicate assignment
Prevent context overwrite by replaceStack

Fixes #408.