minor nitpick, but I'd find the code more readable with

```ocaml
if `crco <> None && crco <> Some old_crc then
  raise ...;
match state with ...
```