The compiler crashes when compiling some files.
Imported from https://youtrack.roxen.com/issue/PIKE-23
Reported by @grubba
Blocking PIKE-20
Recovers from issue where the compiler context could come out of sync due to syntax errors in nested classes. This could in turn lead to various obscure errors, some of which were fatal.