Fixed IsDeref failing in some corner cases.