Fencepost error in ERF extension header handling

If an ERF record has 0 'payload' bytes the last extension header will not be counted and the header length will be calculated incorrectly.