The redirection actually takes place just fine on the outside of this function... and the failpage string already gets built (with language and everything) on the inside of the adapter. Trying to redirect in here wasn't taking us anywhere.
r101576
Also:
r102042, because this was fixed in deployment before trunk, for efficiency reasons.