fix possible inf recursion in cursordocsource.Close()