fixed an incorrect assert and added another one in the invariant check
fixed an incorrect assert and added another one in the invariant check

jpetso/libtorrent,jpetso/libtorrent,jpetso/libtorrent,jpetso/libtorrent