There is a bit of unsafe code in resolve3, where an unsafe pointer is taken to self and captured in closures. This should be trivial to fix with explicit self types.