@NameLookup error in mail Inbox when moving mail file to Domino 7

I upgraded Domino server from release 5 to 7, but not upgraded the template of our mail file (becouse of a little personalizzation).Now I get the following error in the “who” column of Inbox folder:

“ERROR: @Function is not valid in this context”.

Error is due to @NameLookup formula.

The question is: how it is possible if mail file design is not changed?

I tried to design a button on memo form with the same formula and everything is OK (so also data in fields are correct).

Is there someone who had same problem or knows a workaround?

Consider that is not possible to change the formula because every personal folder hinerited formula from Inbox.

Thanks.