About to replace-key, so it can replace multiple keys in one go.
This is necessary when replacing multiple keys at once, since the
stack is immutable.