We accidentally removed the code updating the data index in 8a189a6, resulting in the decoder newer consuming any data. So the data would be parsed as the next rect, causing weird errors.
8a189a6
Makes things a lot clearer by letting each encoding handle its own details and state.