Indeed, I think two BytesReference instances should be considered equal if they have the same content (which is what the way other children of BytesReference are implemented suggests).

My point was this path of the equals method ignores the offset of `other` (it starts comparing its bytes at `0` instead of `other.offset`.