Type mismatch in method AssignClassInstance

There is some code in a database that suddenly started causing problems. The code creates a new document in the database. When some users click the button to create the new document, they get the following error:

Type mismatch in method AssignClassInstance: AINSTANCE found. Unknown expected

This code has not changed recently and not everyone gets this error. What does this error means?

Thanks for any help!

Subject: Run it through the Debugger

Find out where the code is breaking by running the LotusScript Debug on one of those user’s client.