Fix indefinite length encoding so EOC correctly updates