Bug 855990 followup: move TransferBuffer outside of the function because gcc is not a grown-up

Landed on a CLOSED TREE