Fix bug in with_request decorator.

Change-Id: Ia1a9de9d3c47bd07bbe524cf2659402d04bbc9ce