The pipes code contains a few casts using the PByteArray pointer type. The underlying array TByteArray is defined as
With range checks enabled, any access to indices > 32767, even correct ones, result in an range check exception. It may be worth noting that the code is otherwise entirely correct (i.e. no buffer overruns). It is really only the type cast that introduces the failing constraint.