Jim_SubstObj: Add an assertion if ref count is zero