I found that in a test with failures and such, it could be the case that refCnt was 0 so releasing it raised an error.