#1150 Warning instead of cassert failure when wrong reference count