As far as I can tell there's no missing argument or extra argument to be found.
I've checked for whitespaces that aren't plain spaces (and retyped it manually just to be sure there isn't an artifact from cutting and pasting).
I've tried entering it from the command line within tmsh itself.
The only way that it seems to work is if I enter it from the webGUI (Local Traffic >> iRules >> iRule list >> AppName_redir301_irule), after which no error message results at all. (note: the trailing backslashes are removed)
Unfortunately entering it from the command line isn't an option (this will go on a remote system that I don't have access to, via an operator who solely runs scripts).