First of all, there's a little (but important)
flaw in my suggested workaround in that the quotes are missing around @UserNamesList.
Second, it might be necessary to provide a formula context to the evaluate
method; i.e., pass a NotesDocument object as second argument.
Here's a corrected version:
var session:NotesSession = database.getParent();
var doc:NotesDocument = <your code here>;
var userNamesList = session.evaluate("@UserNamesList", doc)