Andrew - thanks for the dirty, hands-on debugging effort. I've informed Dan Wickstrom (acs-content-repository) and Neophytos Demetriou (site-wide-search) that you've uncovered these cursor leaks,
so we should have these fixed by the time we roll-out our OpenACS4 alpha release of the toolkit (in a week or so).