Invoke should not be used inside the on() block.

See https://github.com/capistrano/capistrano/issues/741
Merge pull request #1 from wecapslabs/fix-invoke

Invoke should not be used inside the on() block.