fix bug where Encoder.setMaxHeaderSize expires the wrong number of entries