Fix list handling in parsedecls and parsestatements and typo in error message