Issue #1676: Stop throwing random exceptions within the code generator: Always throw the new BugException which can be associated with a Node and added as an error to the Tree or converted to an Erroneous at its catch site..
Issue #1676: When transforming expressions we can, in general, just return Erroneous in case things went wrong.
Issue #1676: When emitting Erroneous, put an error in the tree if possible, instead of logging immediately.
Issue #1676: If there's a typechecker error in the specifier expression for an attribute there will already be an Error in the tree (and it will already be logged), so there's no point logging it again. Therefore use the plain TreeMaker.Erroneous().