Remove cyclic reference in CFuncPtr instances; see issue #2682.

Backport candidate for the release25-maint branch.
4 files changed