I don't think that a $DEST can be a string. Try $DEST := @P0 + %LASTPAGE. I had a similar issue and this scheme seems to work.
Edit: Forget about that. It can be a string, but your variable needs to be treated as a number. Just get rid of the quotation marks around %LASTPAGE. ($DEST := "@P" + %LASTPAGE)