adjust parser to complain when $this is reassigned on method declarations, fix #3940