Problem with an agent found in a TechNote

I’m working with a customer that has an issue with their calendar. They were moved to a different OU, and now some of the calendar entries cannot be changed by their assistant. I found a technote on it with some LS to use to report and/or correct it:

When I run it, I’m getting the following error message:
“Maximum number of memory segments that Notes can support has been exceeded.”

It doesn’t look like the LS agent is finishing. I’ve been looking at this and looking at this and getting nowhere. Do you know of a way to code this agent so that it runs efficiently? I posted a question on it at the Notes/Domino 6 and 7 Forum on developerWorks, but nothing so far.

Pleae click on the TechNote link to get the script in question. Any help would be appreciated.