Apply patches to a green build when possible

Reviewers: zviad

Differential Revision: https://tails.corp.dropbox.com/D49365