Prevent garbage collection of checkout callbacks.

Potential fix for #635.