> The root cause for this is the fact that the parse-tree listener does not recognize the end of the ModuleDeclarations section correctly and considers the first annotation on a member to belong to the module declarations.
That is because annotations are considered "EndOfLine" statements by the parser. This leads to the unfortunate side-effect that (unless you declare a module attribute), we do not correctly interpret the Annotation as inside a moduleBody, but before it, which results in this