Fix infinite loop in parser (missing test for button end tag)