Simplify SER proto parser a bit

Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>