check for module name matching filename, and improve check for bracket productions and productions with no constructors