[3286] Make fromWire() always start reading from position 0 in the passed buffer

This fixes a bug which occurs if parseHeader() is called separately from
fromWire().