Well I can't tell you I have any idea what's happening here with your error. So just some things for thought...
Try it without the tab control see if that makes a difference... the native tab control doesn't render the non visible tabs. So it's a bit of a pain sometimes.
Are any NEW documents involved? could there be a problem there?
I'm really not understanding your formula but I try not to use @Functions in XPages as much as possible. what is "Form"... is it declared with a "var" somewhere? do any and all your variables gave "var" preceding them? I've seen intermittent problems if you miss just one.
hope that helps.
Dave