Oh dear. I introduced a new crash fixing another one.
@b4n Isn't it possible that sci->sci is already unreffed when the destructor is called? That would explain the errors and the crash.
Yep that was it. Thanks for finding and narrowing this one down @techee!