Fix https://github.com/google/end-to-end/issues/343 by cherry-picking https://github.com/yahoo/end-to-end/commit/6e2342a560043df08e79ef6df39a1faf9843a252.
Fix https://github.com/google/end-to-end/issues/343 by cherry-picking https://github.com/yahoo/end-to-end/commit/6e2342a560043df08e79ef6df39a1faf9843a252.

google/end-to-end,sirdarckcat/end-to-end,google/end-to-end,adhintz/end-to-end,Endika/end-to-end,rcchan/end-to-end,rcchan/end-to-end,Endika/end-to-end,dconnolly/google-end-to-end,Endika/end-to-end,dconnolly/google-end-to-end,digideskio/end-to-end,koto/end-to-end-1,digideskio/end-to-end,sirdarckcat/end-to-end,Endika/end-to-end,kbsriram/end-to-end,google/end-to-end,rcchan/end-to-end,koto/end-to-end-1,sirdarckcat/end-to-end,adhintz/end-to-end,digideskio/end-to-end,adhintz/end-to-end,sirdarckcat/end-to-end,kbsriram/end-to-end,dconnolly/google-end-to-end,kbsriram/end-to-end,kbsriram/end-to-end,rcchan/end-to-end,google/end-to-end,sirdarckcat/end-to-end,google/end-to-end,koto/end-to-end-1,adhintz/end-to-end,koto/end-to-end-1,koto/end-to-end-1,dconnolly/google-end-to-end,kbsriram/end-to-end,Endika/end-to-end,digideskio/end-to-end,adhintz/end-to-end