Iron out more ANSI escape sequence parser bugs