Fixed a problem with dropping main classes from the AST.