This is a copy of issue #708 : the same bug exists for sets. I.e. the same [fix](https://github.com/real-logic/simple-binary-encoding/commit/ad98bfa1d600b108fbec8d92252c9166d865c0ea) is needed for the BEGIN_SET case.