I have not tracked down in detail where all these changes originate, this commit just gets things back to working again.
There was an infinite loop when parsing invalid text after having parsed a color in the border shorthand. See attached testcase for an example.