Fix subsequent deploys

Fixes #2720.