Fix issues dealing with OOM checking in CBOR